Skip to content

KotlinCrypto/hash

Repository files navigation

hash

badge-license badge-latest-release

badge-kotlin badge-bitops badge-core badge-sponges

badge-platform-android badge-platform-jvm badge-platform-js badge-platform-js-node badge-platform-wasm badge-platform-linux badge-platform-macos badge-platform-ios badge-platform-tvos badge-platform-watchos badge-platform-windows badge-support-android-native badge-support-apple-silicon badge-support-js-ir badge-support-linux-arm

Cryptographic hash functions for Kotlin Multiplatform

Modules

API Docs

Get Started

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")
}