Libraries
Signature Source Code
 previous   up   next 

Function Summary
string
genSignature (in string: data, in digestAlgorithm: digestAlg, in rsaKey: encryptionKey)
Generate an RSA signature for data.
boolean
verifySignature (in string: data, in string: signature, in digestAlgorithm: digestAlg, in rsaKey: decryptionKey)
Verify data with the RSA signature signature.

Function Detail

genSignature

const func string: genSignature (in string: data, in digestAlgorithm: digestAlg, in rsaKey: encryptionKey)

Generate an RSA signature for data.

genSignature("abcde", SHA256, stdRsaKeyPair.privateKey)
Parameters:
data - Data for which the signature is generated.
digestAlg - Digest algorithm to be used.
encryptionKey - RSA key to encrypt the signature.
Returns:
the signature of data.

verifySignature

const func boolean: verifySignature (in string: data, in string: signature, in digestAlgorithm: digestAlg, in rsaKey: decryptionKey)

Verify data with the RSA signature signature.

verifySignature("abcde", signature, SHA256, stdRsaKeyPair.privateKey)
Parameters:
data - Data which should be verified with the signature.
signature - Signature of data.
digestAlg - Digest algorithm to be used.
decryptionKey - RSA key to decrypt the signature.
Returns:
TRUE if data could be verified with signature, FALSE otherwise.


 previous   up   next