Skip to content

Commit 7be8ec0

Browse files
authored
Add initial list of actual Multihash.Type implementations to README (#42)
* Add initial list of actual Multihash.Type implementations to README (fixes #41) * Expand Hash implementation list on READ * Add AES-CMAC to Hash implementation list on READ * Add BouncyCastle, Commons Codec & Jacksum to Hash implementation list on READ
1 parent d40dce7 commit 7be8ec0

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,51 @@ Simply clone this repository.
1919
Multihash b58 = Multihash.decode("QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy");
2020
Multihash b36 = Multihash.decode("kmue2y4illvr0m3lt8x6z8iwghtxlzdmkjh957p5rr5cdr9243ugc");
2121
```
22+
23+
Note that this library only decodes & encodes Multihashes, and does not actually include any implementations of the hash functions themselves.
24+
25+
Consumers of this library can use different implementations for different reasons. Here are a few possible implementation choices for each `Multihash.Type`:
26+
27+
* [JDK's `MessageDigest`](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/security/MessageDigest.html) supports (at least) these:
28+
* md5 = MD5
29+
* sha1 = SHA-1
30+
* sha2-224 = SHA-224
31+
* sha2-256 = SHA-256
32+
* sha2-384 = SHA-384
33+
* sha2-512 = SHA-512
34+
* sha2-512-224 = SHA-512/224
35+
* sha2-512-256 = SHA-512/256
36+
* sha3_224 = SHA3-224
37+
* sha3_256 = SHA3-256
38+
* sha3_512 = SHA3-512
39+
* [Google Guava's Hashing](https://github.com/google/guava/wiki/hashingexplained) offers [intentionally only](https://github.com/google/guava/issues/5990#issuecomment-2571350434) these:
40+
* md5 = `@Deprecated Hashing.md5()`
41+
* sha1 = `@Deprecated Hashing.sha1()`
42+
* sha2_256 = `Hashing.sha256()`
43+
* sha2_512 = `Hashing.sha512()`
44+
* murmur3 = `Hashing.murmur3_32_fixed()`
45+
* [Google Tink](https://developers.google.com/tink/supported-key-types#mac)
46+
* AES-CMAC, see [Multicodec Issue #368](https://github.com/multiformats/multicodec/issues/368)
47+
* [BouncyCastle](https://www.bouncycastle.org/documentation/specification_interoperability/)
48+
* blake2*
49+
* blake3*
50+
* shake-*
51+
* ripemd-*
52+
* [Apache Commons Codec](https://commons.apache.org/proper/commons-codec/)
53+
* blake3*
54+
* murmur3
55+
* [Jacksum](https://github.com/jonelo/jacksum)
56+
* skein*
57+
* ...
58+
59+
Please contribute an update to this list if you know of any other related libraries.
60+
2261
## Dependency
62+
2363
You can use this project by building the JAR file as specified below, or by using [JitPack](https://jitpack.io/#multiformats/java-multihash/) (also supporting Gradle, SBT, etc).
2464

2565
for Maven, you can add the follwing sections to your POM.XML:
66+
2667
```xml
2768
<repositories>
2869
<repository>

0 commit comments

Comments
 (0)