Skip to content

Latest commit

 

History

History
60 lines (37 loc) · 1.97 KB

File metadata and controls

60 lines (37 loc) · 1.97 KB

kotlin-multihash

Implementation of multihash -self identifying hashes in Kotlin.

Install

Add the relevant dependency to your project:

Maven

<dependency>
  <groupId>io.ipfs.multiformats</groupId>
  <artifactId>kotlin-multihash</artifactId>
  <version>1.1.0</version>
  <type>pom</type>
</dependency>

Gradle

compile 'io.ipfs.multiformats:kotlin-multihash:1.1.0'

Usage

  val mh = Multihash.fromHexString("0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33")
  val hex = mh.toHexString()

  val buf = Hex.decodeHex("0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33")
  val mhBuf = Multihash.encodeByName(buf, "sha1")
  val mhHex = Hex.encodeHexString(mhBuf)

Maintainers

Captain: @changjiashuai.

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 © 2016 Protocol Labs Inc.