cryptography-random
CryptographyRandom: zero-dependency platform-dependent CSPRNG exposed via kotlin.Random API
Depending on target/platform uses:
JVM - SecureRandom
WasmJs - Crypto.getRandomValues
WasmWasi - random_get
Apple(macOS, iOS, tvOS, watchOS) - CCRandomGenerateBytes
Mingw - BCryptGenRandom
Example
val bytes: ByteArray = CryptographyRandom.nextBytes(20)
Content copied to clipboard
Using in your projects
dependencies {
implementation("dev.whyoleg.cryptography:cryptography-random:0.4.0")
}
Content copied to clipboard
CryptographyRandom: zero-dependency platform-dependent CSPRNG exposed via kotlin.Random API
Depending on target/platform uses:
JVM - SecureRandom
WasmJs - Crypto.getRandomValues
WasmWasi - random_get
Apple(macOS, iOS, tvOS, watchOS) - CCRandomGenerateBytes
Mingw - BCryptGenRandom
Example
val bytes: ByteArray = CryptographyRandom.nextBytes(20)
Content copied to clipboard
Using in your projects
dependencies {
implementation("dev.whyoleg.cryptography:cryptography-random:0.4.0")
}
Content copied to clipboard
Packages
Link copied to clipboard
CryptographyRandom: zero-dependency platform-dependent CSPRNG exposed via kotlin.Random API