Implementation of multihash -self identifying hashes in Kotlin.
Add the relevant dependency to your project:
<dependency>
<groupId>io.ipfs.multiformats</groupId>
<artifactId>kotlin-multihash</artifactId>
<version>1.1.0</version>
<type>pom</type>
</dependency>
compile 'io.ipfs.multiformats:kotlin-multihash:1.1.0'
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)
Captain: @changjiashuai.
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.
MIT © 2016 Protocol Labs Inc.