Skip to content

Latest commit

 

History

History
94 lines (75 loc) · 3.35 KB

README.md

File metadata and controls

94 lines (75 loc) · 3.35 KB

sponges

badge-license badge-latest-release

badge-kotlin

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

Sponge functions For Kotlin Multiplatform

Utilized by the hash repository sha3 implementation

Utilized by the MACs repository for hmac-sha3 and kmac implementations

Usage

// Keccak-p

fun main() {
    // Separate State classes for Keccak-f[200/400/800/1600]
    val state = F1600()
    
    state.addData(index = 0, 23452345254L)
    
    KeccakP(state)
    
    state.forEach {
        println(it)
    }
    // ...
}

Get Started

The best way to keep KotlinCrypto dependencies up to date is by using the version-catalog. Alternatively, see below.

// build.gradle.kts
dependencies {
    implementation("org.kotlincrypto.sponges:keccak:0.3.1")
}