Skip to content

Commit 628392e

Browse files
authored
Merge pull request #13 from veqtor/master
Get hash method & more hash-types
2 parents d86299e + 32c586e commit 628392e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/main/java/io/ipfs/multihash/Multihash.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@ public enum Type {
1717
sha1(0x11, 20),
1818
sha2_256(0x12, 32),
1919
sha2_512(0x13, 64),
20+
sha3_224(0x17, 24),
21+
sha3_256(0x16, 32),
2022
sha3_512(0x14, 64),
23+
keccak_224(0x1a, 24),
24+
keccak_256(0x1b, 32),
25+
keccak_384(0x1c, 48),
26+
keccak_512(0x1d, 64),
2127
blake2b(0x40, 64),
2228
blake2s(0x41, 32);
2329

@@ -69,7 +75,7 @@ public byte[] toBytes() {
6975
System.arraycopy(hash, 0, res, 2, hash.length);
7076
return res;
7177
}
72-
78+
7379
public Type getType() {
7480
return type;
7581
}

0 commit comments

Comments
 (0)