# Sign helper
Sign helper allows to easily perform signature-related operations.
# Provided operations
Below you can find the sign helper's provided operations with some examples
Takes the given
data
, converts it to an JSON object and signs its content using the givenwallet
.fun signSortedTxData(data: Any, wallet: Wallet): ByteArray
1Takes the given
data
, converts it to an alphabetically sorted JSON object and signs its content using the givenwallet
.fun signSorted(data: Any, wallet: Wallet): ByteArray
1Sign in PKCS1 v 1.5 with private Key the payload.
fun signPowerUpSignature( senderDid: String, pairwiseDid: String, timestamp: String, privateKey: RSAPrivateKey ): ByteArray
1
2
3Verifies that the given
signature
is valid for the givensignedData
against the givenkey
.private fun verifySignature( signature: ByteArray, signedData: ByteArray, key: PublicKey ): Boolean
1
2
3Verifies that the given
signature
is valid for the givensignedData
by using the public keys contained inside the givendidDocument
.fun verifySignature( signature: ByteArray, signedData: Any, didDocument: DidDocument ): Boolean
1
2
3