parseSecureHash

@NotNull
abstract fun parseSecureHash(@NotNull algoNameAndHexString: String): SecureHash

Parses a secure hash in string form into a SecureHash.

A valid secure hash string should be containing the algorithm and hexadecimal representation of the bytes separated by the colon character (':') (net.corda.v5.crypto.SecureHash.DELIMITER).

Parameters

algoNameAndHexString

The algorithm name followed by the hex string form of the digest, separated by colon (':') e.g. SHA-256:98AF8725385586B41FEFF205B4E05A000823F78B5F8F5C02439CE8F67A781D90.

Throws

if the digest algorithm is not supported or if the hex string length does not meet the algorithm's digest length.