corda / net.corda.core.crypto / SecureHash / nonceHashAs

nonceHashAs

@JvmStatic fun nonceHashAs(algorithm: String, bytes: ByteArray): SecureHash

Computes the digest of the ByteArray which is resistant to pre-image attacks. It computes the hash of the hash for SHA2-256 and other algorithms loaded via JCA MessageDigest. For custom algorithms the strategy can be modified via DigestAlgorithm.

Parameters

algorithm - The MessageDigest algorithm to use.

bytes - The ByteArray to hash.