{"id":20850595,"url":"https://github.com/multiformats/java-multihash","last_synced_at":"2025-04-07T15:08:28.337Z","repository":{"id":40380484,"uuid":"70414035","full_name":"multiformats/java-multihash","owner":"multiformats","description":"A Java implementation of Multihash","archived":false,"fork":false,"pushed_at":"2025-03-01T13:41:56.000Z","size":435,"stargazers_count":46,"open_issues_count":6,"forks_count":30,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-31T13:17:04.036Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/multiformats.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-09T15:58:48.000Z","updated_at":"2025-03-01T13:42:00.000Z","dependencies_parsed_at":"2024-08-22T18:13:28.459Z","dependency_job_id":"15004044-714a-484c-a7f6-c5ccd64ab721","html_url":"https://github.com/multiformats/java-multihash","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiformats%2Fjava-multihash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiformats%2Fjava-multihash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiformats%2Fjava-multihash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiformats%2Fjava-multihash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/multiformats","download_url":"https://codeload.github.com/multiformats/java-multihash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247675597,"owners_count":20977376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T03:10:30.620Z","updated_at":"2025-04-07T15:08:28.311Z","avatar_url":"https://github.com/multiformats.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# java-multihash\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)\n[![](https://img.shields.io/badge/project-multiformats-blue.svg?style=flat-square)](https://github.com/multiformats/multiformats)\n[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](https://webchat.freenode.net/?channels=%23ipfs)\n[![Travis CI](https://img.shields.io/travis/multiformats/java-multihash.svg?style=flat-square\u0026branch=master)](https://travis-ci.org/multiformats/java-multihash)\n[![Release](https://jitpack.io/v/multiformats/java-multihash.svg)](https://jitpack.io/#multiformats/java-multihash)\n[![](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n\n\u003e A Java implementation of [multihash](https://github.com/multiformats/multihash).\n\n## Install\n\nSimply clone this repository.\n\n## Usage\n\n```java\nMultihash b58 = Multihash.decode(\"QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy\");\nMultihash b36 = Multihash.decode(\"kmue2y4illvr0m3lt8x6z8iwghtxlzdmkjh957p5rr5cdr9243ugc\");\n```\n\nNote that this library only decodes \u0026 encodes Multihashes, and does not actually include any implementations of the hash functions themselves.\n\nConsumers of this library can use different implementations for different reasons. Here are a few possible implementation choices for each `Multihash.Type`:\n\n* [JDK's `MessageDigest`](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/security/MessageDigest.html) supports (at least) these:\n  * md5 = MD5\n  * sha1 = SHA-1\n  * sha2-224 = SHA-224\n  * sha2-256 = SHA-256\n  * sha2-384 = SHA-384\n  * sha2-512 = SHA-512\n  * sha2-512-224 = SHA-512/224\n  * sha2-512-256 = SHA-512/256\n  * sha3_224 = SHA3-224\n  * sha3_256 = SHA3-256\n  * sha3_512 = SHA3-512\n* [Google Guava's Hashing](https://github.com/google/guava/wiki/hashingexplained) offers [intentionally only](https://github.com/google/guava/issues/5990#issuecomment-2571350434) these:\n  * md5 = `@Deprecated Hashing.md5()`\n  * sha1 = `@Deprecated Hashing.sha1()`\n  * sha2_256 = `Hashing.sha256()`\n  * sha2_512 = `Hashing.sha512()`\n  * murmur3 = `Hashing.murmur3_32_fixed()`\n* [Google Tink](https://developers.google.com/tink/supported-key-types#mac)\n  * AES-CMAC, see [Multicodec Issue #368](https://github.com/multiformats/multicodec/issues/368)\n* [BouncyCastle](https://www.bouncycastle.org/documentation/specification_interoperability/)\n  * blake2*\n  * blake3*\n  * shake-*\n  * ripemd-*\n* [Apache Commons Codec](https://commons.apache.org/proper/commons-codec/)\n  * blake3*\n  * murmur3\n* [Jacksum](https://github.com/jonelo/jacksum)\n  * skein*\n  * ...\n\nPlease contribute an update to this list if you know of any other related libraries.\n\n## Dependency\n\nYou can use this project by building the JAR file as specified below, or by using [JitPack](https://jitpack.io/#multiformats/java-multihash/) (also supporting Gradle, SBT, etc).\n\nfor Maven, you can add the follwing sections to your POM.XML:\n\n```xml\n  \u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003ejitpack.io\u003c/id\u003e\n        \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n    \u003c/repository\u003e\n  \u003c/repositories\u003e\n\n  \u003cdependencies\u003e\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.github.multiformats\u003c/groupId\u003e\n      \u003cartifactId\u003ejava-multihash\u003c/artifactId\u003e\n      \u003cversion\u003e$LATEST_VERSION\u003c/version\u003e\n    \u003c/dependency\u003e\n  \u003c/dependencies\u003e\n```\n\n## Testing\n\n`mvn test`\n\n## Building\n\n`mvn package` will build a JAR file with Maven dependency information.\n\n## Releasing\n\nThe 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.\n\n## Maintainers\n\nCaptain: [@ianopolous](https://github.com/ianopolous).\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/multiformats/java-multihash/issues).\n\nCheck out our [contributing document](https://github.com/multiformats/multiformats/blob/master/contributing.md) 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](https://github.com/ipfs/community/blob/master/code-of-conduct.md).\n\nSmall note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.\n\n## License\n\n[MIT](LICENSE) © 2015 Ian Preston\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultiformats%2Fjava-multihash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmultiformats%2Fjava-multihash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultiformats%2Fjava-multihash/lists"}