ktor-utils / io.ktor.util / getDigestFunction

getDigestFunction

fun getDigestFunction(algorithm: String, salt: String): (String) -> ByteArray
Deprecated: Use getDigestFunction with non-constant salt.

Create a digest function with the specified algorithm and salt

fun getDigestFunction(algorithm: String, salt: (value: String) -> String): (String) -> ByteArray

Create a digest function with the specified algorithm and salt provider.

Parameters

algorithm - digest algorithm name

salt - a function computing a salt for a particular hash input value