
Implements sponge functions for cryptographic operations, supporting SHA-3, HMAC-SHA3, and KMAC algorithms. Offers separate Keccak state classes for various bit lengths.
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)
state.keccakP()
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.5.0")
}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)
state.keccakP()
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.5.0")
}