Skip to content

lib multihash is the kotlin implementation of https://github.com/multiformats/multihash, or self-describing hashes.

Notifications You must be signed in to change notification settings

komputing/kotlin-multihash

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

lib multihash is the kotlin implementation of https://github.com/multiformats/multihash, or self-describing hashes.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 100.0%