Sponge functions For Kotlin Multiplatform
Utilized by the hash repository sha3
implementation
Utilized by the MACs repository for hmac-sha3
and kmac
implementations
// 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)
}
// ...
}
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")
}