computeNonce

fun computeNonce(privacySalt: PrivacySalt, groupIndex: Int, internalIndex: Int): SecureHash.SHA256

Deprecated

This has been moved to DigestService

Method to compute a nonce based on privacySalt, component group index and component internal index. SHA256d (double SHA256) is used to prevent length extension attacks.

Return

SHA256(SHA256(privacySalt || groupIndex || internalIndex))

Parameters

privacySalt
groupIndex

the fixed index (ordinal) of this component group.

internalIndex

the internal index of this object in its corresponding components list.