Skip to content

Commit

Permalink
Merge pull request #13 from veqtor/master
Browse files Browse the repository at this point in the history
Get hash method & more hash-types
  • Loading branch information
ianopolous authored Aug 9, 2018
2 parents d86299e + 32c586e commit 628392e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/io/ipfs/multihash/Multihash.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ public enum Type {
sha1(0x11, 20),
sha2_256(0x12, 32),
sha2_512(0x13, 64),
sha3_224(0x17, 24),
sha3_256(0x16, 32),
sha3_512(0x14, 64),
keccak_224(0x1a, 24),
keccak_256(0x1b, 32),
keccak_384(0x1c, 48),
keccak_512(0x1d, 64),
blake2b(0x40, 64),
blake2s(0x41, 32);

Expand Down Expand Up @@ -69,7 +75,7 @@ public byte[] toBytes() {
System.arraycopy(hash, 0, res, 2, hash.length);
return res;
}

public Type getType() {
return type;
}
Expand Down

0 comments on commit 628392e

Please sign in to comment.