java-multihash
java-multihash copied to clipboard
A Java implementation of Multihash
ToDo: - [ ] Test coverage
Given that Multihash.hashCode() invokes Multihash.hashCode(), and e.g. https://madhead.me/posts/enums-fuckup/, this seems more appropriate.
It would be nice if this was in maven central.
```java var args = AddArgs.Builder.newInstance().setCidVersion(1).setHash("blake3").build(); ipfs.add(namedStreamable, args); ``` causes: ``` Invalid cid bytes: 01551e20623a5460d841b6d1c13d080e85500e0043fd4ba4a8ba9c1aa9b4f6e0d212276c io.ipfs.cid.Cid$CidEncodingException: at io.ipfs.cid.Cid.cast(Cid.java:188) at io.ipfs.cid.Cid.decode(Cid.java:168) at io.ipfs.api.MerkleNode.(MerkleNode.java:27) at io.ipfs.api.MerkleNode.fromJSON(MerkleNode.java:85) at io.ipfs.api.IPFS.lambda$add$1(IPFS.java:161) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1708) at...
@ianopolous @mk868 does this seem better to you as well? (Or am I just confused?)
Some algorithms (such as SHAKE128) can generate an output of arbitrary length. For example, the following are all valid SHAKE128 hashes of the string `hello` in UTF-8: ``` 8eb4 8eb4b6a932f28033...
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 4 to 5. Release notes Sourced from actions/setup-java's releases. v5.0.0 What's Changed Breaking Changes Upgrade to node 24 by @salmanmkc in actions/setup-java#888 Make sure your runner is...