
Line-by-line transliteration of RustCrypto/hashes, offering API parity across many cryptographic hash algorithms (SHA‑1, BLAKE2, MD5, …); includes source provenance headers.
This is a Kotlin Multiplatform line-by-line transliteration port of RustCrypto/hashes.
Original Project: This port is based on RustCrypto/hashes. All design credit and project intent belong to the upstream authors; this repository is a faithful port to Kotlin Multiplatform with no behavioural changes intended.
This is an in-progress port. The goal is feature parity with the upstream Rust crate while providing a native Kotlin Multiplatform API. Every Kotlin file carries a // port-lint: source <path> header naming its upstream Rust counterpart so the AST-distance tool can track provenance.
The text below is reproduced and lightly edited from
https://github.com/RustCrypto/hashes. It is the upstream project's own description and remains under the upstream authors' authorship; links have been rewritten to absolute upstream URLs so they continue to resolve from this repository.
Collection of cryptographic hash functions written in pure Rust.
All algorithms reside in separate crates and are implemented using traits from digest crate.
Usage examples are provided in digest and hash implementation crate docs.
Additionally all crates do not require the standard library (i.e. no_std capable) and can be
easily used for bare-metal or WebAssembly programming by disabling default crate features.
Note: For new applications, or where compatibility with other existing standards is not a primary concern, we strongly recommend to use either BLAKE3, SHA-2 or SHA-3.
| Algorithm | Crate | Crates.io | Documentation | MSRV | Security |
|---|---|---|---|---|---|
| Ascon-Hash256 | ascon‑hash256 |
1.85 | 💚 | ||
| Ascon-XOF128 | ascon‑xof128 |
1.85 | 💚 | ||
| Bash hash | bash‑hash |
1.85 | 💚 | ||
| BelT hash | belt‑hash |
1.85 | 💚 | ||
| BLAKE2 | blake2 |
1.85 | 💚 | ||
| cSHAKE | cshake |
1.85 | 💚 | ||
| FSB | fsb |
1.85 | 💚 | ||
| GOST R 34.11-94 | gost94 |
1.85 | 💛 | ||
| Grøstl (Groestl) | groestl |
1.85 | 💚 | ||
| JH | jh |
1.85 | 💚 | ||
| KangarooTwelve | k12 |
1.85 | 💚 | ||
| Kupyna | kupyna |
1.85 | 💚 | ||
| MD2 | md2 |
1.85 | 💔 | ||
| MD4 | md4 |
1.85 | 💔 | ||
| MD5 |
md5 ❗
|
1.85 | 💔 | ||
| RIPEMD | ripemd |
1.85 | 💚 | ||
| SHA-1 | sha1 |
1.85 | 💔 | ||
| SHA-1 Checked | sha1-checked |
1.85 | 💛 | ||
| SHA-2 | sha2 |
1.85 | 💚 | ||
| SHA-3 (Keccak) | sha3 |
1.85 | 💚 | ||
| SHABAL | shabal |
1.85 | 💚 | ||
| Skein | skein |
1.85 | 💚 | ||
| SM3 (OSCCA GM/T 0004-2012) | sm3 |
1.85 | 💚 | ||
| Streebog (GOST R 34.11-2012) | streebog |
1.85 | 💛 | ||
| Tiger | tiger |
1.85 | 💚 | ||
| TurboSHAKE | turboshake |
1.85 | 💚 | ||
| Whirlpool | whirlpool |
1.85 | 💚 |
NOTE: the blake3 crate implements the digest traits used by the rest of the hashes in this repository, but is maintained by the BLAKE3 team.
The following describes the security level ratings associated with each hash function (i.e. algorithms, not the specific implementation):
| Heart | Description |
|---|---|
| 💚 | No known successful attacks |
| 💛 | Theoretical break: security lower than claimed |
| 💔 | Attack demonstrated in practice: avoid if at all possible |
See the Security page on Wikipedia for more information.
Whenever possible crates are published under the same name as the crate folder.
Owners of md5 declined to participate in this project.
This crate does not implement the digest traits, so it is not interoperable with the RustCrypto ecosystem.
This is why we publish our MD5 implementation as md-5 and mark it with the ❗ mark.
Note that the library itself is named as md5, i.e. inside use statements you should use md5, not md_5.
All crates in this repository are licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
dependencies {
implementation("io.github.kotlinmania:sha1-kotlin:0.1.0")
}./gradlew build
./gradlew testSee AGENTS.md and CLAUDE.md for translator discipline, port-lint header convention, and Rust → Kotlin idiom mapping.
This Kotlin port is distributed under the same MIT license as the upstream RustCrypto/hashes. See LICENSE (and any sibling LICENSE-* / NOTICE files mirrored from upstream) for the full text.
Original work copyrighted by the hashes authors.
Kotlin port: Copyright (c) 2026 Sydney Renee and The Solace Project.
Thanks to the RustCrypto/hashes maintainers and contributors for the original Rust implementation. This port reproduces their work in Kotlin Multiplatform; bug reports about upstream design or behavior should go to the upstream repository.
This is a Kotlin Multiplatform line-by-line transliteration port of RustCrypto/hashes.
Original Project: This port is based on RustCrypto/hashes. All design credit and project intent belong to the upstream authors; this repository is a faithful port to Kotlin Multiplatform with no behavioural changes intended.
This is an in-progress port. The goal is feature parity with the upstream Rust crate while providing a native Kotlin Multiplatform API. Every Kotlin file carries a // port-lint: source <path> header naming its upstream Rust counterpart so the AST-distance tool can track provenance.
The text below is reproduced and lightly edited from
https://github.com/RustCrypto/hashes. It is the upstream project's own description and remains under the upstream authors' authorship; links have been rewritten to absolute upstream URLs so they continue to resolve from this repository.
Collection of cryptographic hash functions written in pure Rust.
All algorithms reside in separate crates and are implemented using traits from digest crate.
Usage examples are provided in digest and hash implementation crate docs.
Additionally all crates do not require the standard library (i.e. no_std capable) and can be
easily used for bare-metal or WebAssembly programming by disabling default crate features.
Note: For new applications, or where compatibility with other existing standards is not a primary concern, we strongly recommend to use either BLAKE3, SHA-2 or SHA-3.
| Algorithm | Crate | Crates.io | Documentation | MSRV | Security |
|---|---|---|---|---|---|
| Ascon-Hash256 | ascon‑hash256 |
1.85 | 💚 | ||
| Ascon-XOF128 | ascon‑xof128 |
1.85 | 💚 | ||
| Bash hash | bash‑hash |
1.85 | 💚 | ||
| BelT hash | belt‑hash |
1.85 | 💚 | ||
| BLAKE2 | blake2 |
1.85 | 💚 | ||
| cSHAKE | cshake |
1.85 | 💚 | ||
| FSB | fsb |
1.85 | 💚 | ||
| GOST R 34.11-94 | gost94 |
1.85 | 💛 | ||
| Grøstl (Groestl) | groestl |
1.85 | 💚 | ||
| JH | jh |
1.85 | 💚 | ||
| KangarooTwelve | k12 |
1.85 | 💚 | ||
| Kupyna | kupyna |
1.85 | 💚 | ||
| MD2 | md2 |
1.85 | 💔 | ||
| MD4 | md4 |
1.85 | 💔 | ||
| MD5 |
md5 ❗
|
1.85 | 💔 | ||
| RIPEMD | ripemd |
1.85 | 💚 | ||
| SHA-1 | sha1 |
1.85 | 💔 | ||
| SHA-1 Checked | sha1-checked |
1.85 | 💛 | ||
| SHA-2 | sha2 |
1.85 | 💚 | ||
| SHA-3 (Keccak) | sha3 |
1.85 | 💚 | ||
| SHABAL | shabal |
1.85 | 💚 | ||
| Skein | skein |
1.85 | 💚 | ||
| SM3 (OSCCA GM/T 0004-2012) | sm3 |
1.85 | 💚 | ||
| Streebog (GOST R 34.11-2012) | streebog |
1.85 | 💛 | ||
| Tiger | tiger |
1.85 | 💚 | ||
| TurboSHAKE | turboshake |
1.85 | 💚 | ||
| Whirlpool | whirlpool |
1.85 | 💚 |
NOTE: the blake3 crate implements the digest traits used by the rest of the hashes in this repository, but is maintained by the BLAKE3 team.
The following describes the security level ratings associated with each hash function (i.e. algorithms, not the specific implementation):
| Heart | Description |
|---|---|
| 💚 | No known successful attacks |
| 💛 | Theoretical break: security lower than claimed |
| 💔 | Attack demonstrated in practice: avoid if at all possible |
See the Security page on Wikipedia for more information.
Whenever possible crates are published under the same name as the crate folder.
Owners of md5 declined to participate in this project.
This crate does not implement the digest traits, so it is not interoperable with the RustCrypto ecosystem.
This is why we publish our MD5 implementation as md-5 and mark it with the ❗ mark.
Note that the library itself is named as md5, i.e. inside use statements you should use md5, not md_5.
All crates in this repository are licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
dependencies {
implementation("io.github.kotlinmania:sha1-kotlin:0.1.0")
}./gradlew build
./gradlew testSee AGENTS.md and CLAUDE.md for translator discipline, port-lint header convention, and Rust → Kotlin idiom mapping.
This Kotlin port is distributed under the same MIT license as the upstream RustCrypto/hashes. See LICENSE (and any sibling LICENSE-* / NOTICE files mirrored from upstream) for the full text.
Original work copyrighted by the hashes authors.
Kotlin port: Copyright (c) 2026 Sydney Renee and The Solace Project.
Thanks to the RustCrypto/hashes maintainers and contributors for the original Rust implementation. This port reproduces their work in Kotlin Multiplatform; bug reports about upstream design or behavior should go to the upstream repository.