# 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): ByteArray1Takes the given
data, converts it to an alphabetically sorted JSON object and signs its content using the givenwallet.fun signSorted(data: Any, wallet: Wallet): ByteArray1Sign in PKCS1 v 1.5 with private Key the payload.
fun signPowerUpSignature( senderDid: String, pairwiseDid: String, timestamp: String, privateKey: RSAPrivateKey ): ByteArray1
2
3Verifies that the given
signatureis valid for the givensignedDataagainst the givenkey.private fun verifySignature( signature: ByteArray, signedData: ByteArray, key: PublicKey ): Boolean1
2
3Verifies that the given
signatureis valid for the givensignedDataby using the public keys contained inside the givendidDocument.fun verifySignature( signature: ByteArray, signedData: Any, didDocument: DidDocument ): Boolean1
2
3