sign

Utility to simplify the act of signing a byte array.

Return

the DigitalSignature object on the input message.

Parameters

bytesToSign

the data/message to be signed in ByteArray form (usually the Merkle root).

Throws

if the signature scheme is not supported for this private key.

if the private key is invalid.

if signing is not possible due to malformed data or private key.


Utility to simplify the act of signing a byte array and return a DigitalSignature.WithKey object. Note that there is no check if the public key matches with the signing private key.

Return

the DigitalSignature.WithKey object on the input message bytesToSign and publicKey.

Parameters

bytesToSign

the data/message to be signed in ByteArray form (usually the Merkle root).

Throws

if the signature scheme is not supported for this private key.

if the private key is invalid.

if signing is not possible due to malformed data or private key.


Helper function to sign with a key pair.

Return

the digital signature (in ByteArray) on the input message.

Parameters

bytesToSign

the data/message to be signed in ByteArray form (usually the Merkle root).

Throws

if the signature scheme is not supported for this private key.

if the private key is invalid.

if signing is not possible due to malformed data or private key.


Helper function to sign the bytes of bytesToSign with a key pair.


Helper function for signing a SignableData object.

Return

a TransactionSignature object.

Parameters

signableData

the object to be signed.

Throws

if the signature scheme is not supported for this private key.

if the private key is invalid.

if signing is not possible due to malformed data or private key.