sha256

fun String.sha256(salt: String = ""): String

Computes the SHA-256 hash of this String with an optional string salt.

Return

the hex-encoded SHA-256 hash

Parameters

salt

the salt string (default empty)


Computes the SHA-256 hash of this String with a byte array salt.

Return

the hex-encoded SHA-256 hash

Parameters

salt

the salt bytes