tuweni / org.apache.tuweni.crypto / Hash / digestUsingAlgorithm

digestUsingAlgorithm

static fun digestUsingAlgorithm(input: ByteArray!, alg: String!): ByteArray! (source)

Helper method to generate a digest using the provided algorithm.

Parameters

input - ByteArray!: The input bytes to produce the digest for.

alg - String!: The name of the digest algorithm to use.

Exceptions

NoSuchAlgorithmException - If no Provider supports a MessageDigestSpi implementation for the specified algorithm.

Return
ByteArray!: A digest.

static fun digestUsingAlgorithm(input: Bytes!, alg: String!): Bytes! (source)

Helper method to generate a digest using the provided algorithm.

Parameters

input - Bytes!: The input bytes to produce the digest for.

alg - String!: The name of the digest algorithm to use.

Exceptions

NoSuchAlgorithmException - If no Provider supports a MessageDigestSpi implementation for the specified algorithm.

Return
Bytes!: A digest.