GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - multiformats/java-multihash: A Java implementation of Multihash

BranchesTags
Open more actions menu

Latest commit

 

History

118 Commits
118 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.mvn
.mvn
 
 
src
src
 
 
.git-blame-ignore-revs
.git-blame-ignore-revs
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
jitpack.yml
jitpack.yml
 
 
mvnw
mvnw
 
 
mvnw.cmd
mvnw.cmd
 
 
pom.xml
pom.xml
 
 

Repository files navigation

java-multihash

Travis CI Release

A Java implementation of multihash.

Install

Simply clone this repository.

Usage

Multihash b58 = Multihash.decode("QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy");
Multihash b36 = Multihash.decode("kmue2y4illvr0m3lt8x6z8iwghtxlzdmkjh957p5rr5cdr9243ugc");

Note that this library only decodes & encodes Multihashes, and does not actually include any implementations of the hash functions themselves.

Consumers of this library can use different implementations for different reasons. Here are a few possible implementation choices for each Multihash.Type:

  • JDK's MessageDigest supports (at least) these:
    • md5 = MD5
    • sha1 = SHA-1
    • sha2-224 = SHA-224
    • sha2-256 = SHA-256
    • sha2-384 = SHA-384
    • sha2-512 = SHA-512
    • sha2-512-224 = SHA-512/224
    • sha2-512-256 = SHA-512/256
    • sha3_224 = SHA3-224
    • sha3_256 = SHA3-256
    • sha3_512 = SHA3-512
  • Google Guava's Hashing offers intentionally only these:
    • md5 = @Deprecated Hashing.md5()
    • sha1 = @Deprecated Hashing.sha1()
    • sha2_256 = Hashing.sha256()
    • sha2_512 = Hashing.sha512()
    • murmur3 = Hashing.murmur3_32_fixed()
  • Google Tink
    • AES-CMAC, see Multicodec Issue #368
  • BouncyCastle
    • blake2*
    • blake3*
    • shake-*
    • ripemd-*
  • Apache Commons Codec
    • blake3*
    • murmur3
  • Jacksum
    • skein*
    • ...

Please contribute an update to this list if you know of any other related libraries.

Dependency

You can use this project by building the JAR file as specified below, or by using JitPack (also supporting Gradle, SBT, etc).

for Maven, you can add the follwing sections to your POM.XML:

  <repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>com.github.multiformats</groupId>
      <artifactId>java-multihash</artifactId>
      <version>$LATEST_VERSION</version>
    </dependency>
  </dependencies>

Testing

mvn test

Building

mvn package will build a JAR file with Maven dependency information.

Releasing

The version number is specified in the pom.xml file and must be changed in order to be accurately reflected in the JAR file manifest. A git tag must be added in the format "vx.x.x" for JitPack to work.

Maintainers

Captain: @ianopolous.

Contribute

Contributions welcome. Please check out the issues.

Check out our contributing document for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS Code of Conduct.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © 2015 Ian Preston

About

A Java implementation of Multihash

Resources

Readme
MIT license
Activity
Custom properties

Stars

53 stars

Watchers

11 watching

Forks

28 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.