Skip to content

Commit

Permalink
Merge pull request #11 from celeduc/md5
Browse files Browse the repository at this point in the history
Add MD5 support
  • Loading branch information
ianopolous committed Sep 4, 2017
2 parents 217e9ab + 209c65a commit 43d003f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ for Maven, you can add the follwing sections to your POM.XML:
<dependency>
<groupId>com.github.multiformats</groupId>
<artifactId>java-multihash</artifactId>
<version>v1.1.0</version>
<version>v1.2.0</version>
</dependency>
</dependencies>
```
Expand Down
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<attribute name="Class-Path" value="${manifest_cp}"/>
<attribute name="Implementation-Vendor" value="io.ipfs"/>
<attribute name="Implementation-Title" value="multihash"/>
<attribute name="Implementation-Version" value="1.1.0"/>
<attribute name="Implementation-Version" value="1.2.0"/>
</manifest>
</jar>
</target>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>io.ipfs</groupId>
<artifactId>multihash</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
<packaging>jar</packaging>

<name>multihash</name>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/io/ipfs/multihash/Multihash.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

public class Multihash {
public enum Type {
md5(0xd5, 16),
sha1(0x11, 20),
sha2_256(0x12, 32),
sha2_512(0x13, 64),
Expand Down
1 change: 1 addition & 0 deletions src/test/java/io/ipfs/multihash/MultihashTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public void base58Test() {
@Test
public void multihashTest() {
Object[][] examples = new Object[][]{
{Multihash.Type.md5, "MD5", "9qZY4e2uauH3bG83FdaPSaPzA", "hello world"},
{Multihash.Type.sha1, "SHA-1", "5drNu81uhrFLRiS4bxWgAkpydaLUPW", "hello world"},
{Multihash.Type.sha2_256, "SHA-256", "QmaozNR7DZHQK1ZcU9p7QdrshMvXqWK6gpu5rmrkPdT3L4", "hello world"},
{Multihash.Type.sha2_512, "SHA-512", "8Vtkv2tdQ43bNGdWN9vNx9GVS9wrbXHk4ZW8kmucPmaYJwwedXir52kti9wJhcik4HehyqgLrQ1hBuirviLhxgRBNv", "hello world"}
Expand Down

0 comments on commit 43d003f

Please sign in to comment.