Cryptographic hash functions for Kotlin Multiplatform
The best way to keep KotlinCrypto
dependencies up to date is by using the
version-catalog. Alternatively, you can use the BOM as
shown below.
// build.gradle.kts
dependencies {
// define the BOM and its version
implementation(platform("org.kotlincrypto.hash:bom:0.6.0"))
// define artifacts without version
// MD5
implementation("org.kotlincrypto.hash:md")
// SHA-1
implementation("org.kotlincrypto.hash:sha1")
// SHA-224, SHA-256, SHA-384, SHA-512
// SHA-512/t, SHA-512/224, SHA-512/256
implementation("org.kotlincrypto.hash:sha2")
// Keccak-224, Keccak-256, Keccak-384, Keccak-512
// SHA3-224, SHA3-256, SHA3-384, SHA3-512
// SHAKE128, SHAKE256
// CSHAKE128, CSHAKE256
// ParallelHash128, ParallelHash256
// TupleHash128, TupleHash256
implementation("org.kotlincrypto.hash:sha3")
// BLAKE2b, BLAKE2s
implementation("org.kotlincrypto.hash:blake2")
}