Package de.nycode.bcrypt

Functions

hash
Link copied to clipboard
expect fun hash(input: String, cost: Int = 6): ByteArray

Hashes an input with bcrypt with the specified cost.

actual fun hash(input: String, cost: Int = 6): ByteArray
actual fun hash(input: String, cost: Int = 6): ByteArray
hashAsync
Link copied to clipboard
suspend fun hashAsync(input: String, cost: Int): ByteArray

Hashes an input asynchronously with the specified cost.

verify
Link copied to clipboard
expect fun verify(input: String, expected: ByteArray): Boolean

Verifies an input to match the expected hash with the bcrypt algorithm.

actual fun verify(input: String, expected: ByteArray): Boolean

Verifies an input to match the expected hash with the bcrypt algorithm.

actual fun verify(input: String, expected: ByteArray): Boolean
verifyAsync
Link copied to clipboard
suspend fun verifyAsync(input: String, expected: ByteArray): Boolean

Verifies an input asynchronously to match the expected hash with the bcrypt algorithm.