fun PublicKey.verify(signatureData: ByteArray, clearData: ByteArray): Boolean
Helper function to verify a signature.
signatureData
- the signature on a message.
clearData
- the clear data/message that was signed (usually the Merkle root).
InvalidKeyException
- if the key is invalid.
SignatureException
- if this signatureData object is not initialized properly,
the passed-in signatureData is improperly encoded or of the wrong type,
if this signatureData algorithm is unable to process the input data provided, etc.
IllegalArgumentException
- if the signature scheme is not supported for this private key or if any of the clear or signature data is empty.
fun PublicKey.verify(transactionSignature: TransactionSignature): Boolean
Helper function to verify a metadata attached signature. It is noted that the transactionSignature contains signatureData and a MetaData object that contains the signer's public key and the transaction's Merkle root.
transactionSignature
- a TransactionSignature object that .
InvalidKeyException
- if the key is invalid.
SignatureException
- if this signatureData object is not initialized properly,
the passed-in signatureData is improperly encoded or of the wrong type,
if this signatureData algorithm is unable to process the input data provided, etc.
IllegalArgumentException
- if the signature scheme is not supported for this private key or if any of the clear or signature data is empty.