Sponges
Sponge functions for Kotlin Multiplatform
Install / Use
/learn @KotlinCrypto/SpongesREADME
sponges
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)
state.keccakP()
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.5.0")
}
<!-- TAG_VERSION -->
<!-- TAG_DEPENDENCIES -->
<!-- TAG_PLATFORMS -->