static fun digestUsingAlgorithm(input: ByteArray, alg: String): ByteArray
(source)static fun digestUsingAlgorithm(input: Bytes, alg: String): Bytes
(source)
Helper method to generate a digest using the provided algorithm.
input
- The input bytes to produce the digest for.
alg
- The name of the digest algorithm to use.
NoSuchAlgorithmException
- If no Provider supports a MessageDigestSpi implementation for the specified algorithm.
Return
A digest.