Skip to content

Secure random

CryptographyRandom: zero-dependency platform-dependent CSPRNG exposed via kotlin.Random API

Depending on target/platform uses:

Example

val bytes: ByteArray = CryptographyRandom.nextBytes(20)

Using in your projects

dependencies {
    implementation("dev.whyoleg.cryptography:cryptography-random:0.5.0")
}