corda / net.corda.core.crypto / componentHash

componentHash

fun componentHash(opaqueBytes: OpaqueBytes, privacySalt: PrivacySalt, componentGroupIndex: Int, internalIndex: Int): SecureHash

Compute the hash of each serialised component so as to be used as Merkle tree leaf. The resultant output (leaf) is calculated using the SHA256d algorithm, thus SHA256(SHA256(nonce || serializedComponent)), where nonce is computed from computeNonce.

fun componentHash(nonce: SecureHash, opaqueBytes: OpaqueBytes): SecureHash

Return the SHA256(SHA256(nonce || serializedComponent)).