Signature Functions(4.3)
Use the Signature functions to generate digital signatures for data.
signPrepare
This function is called to get a key from a Java keystore file.
any signPrepare ( string file, string keystoreType, string password)
Parameter | Description |
---|---|
| The file that contains the keystore dat |
| The keystore type e g . JKS, PKCS8, PKCS12 or CA_CERTIFICATES_PATH |
| The keystore password |
Returns | A private key object |
signData
This function calculates the hash value of a bytearray, using the specified algorithm, and signs the result.
bytearray signData ( any key, bytearray data, string algorithm)
Parameter | Description |
---|---|
| A private key object |
| The data to be signed |
| The signature algorithm e g SHA1withDSA, SHA1withRSA or SHA256withRSA. |
Returns | A bytearray containing the digital signature |
signHmac
This function calculates the hash value of a key retrieved with the signPrepare function or a bytearray constituting a key, using the specified algorithm, and signs the result.
bytearray signData ( any key, bytearray data, string algorithm)
Parameter | Description |
---|---|
| A private key object |
| The data to be signed |
| The signature algorithm e g Hmac-SHA256 or Hmac-SHA512. |
Returns | A bytearray containing the digital signature |
signHmacSHA256
This function calculates the hash value of a key retrieved with the signPrepare function or a bytearray constituting a key, using Hmac-SHA256, and signs the result.
bytearray signData ( any key, bytearray data)
Parameter | Description |
---|---|
| A private key object |
| The data to be signed |
Returns | A bytearray containing the digital signature |
signHmacSHA512
This function calculates the hash value of a key retrieved with the signPrepare function or a bytearray constituting a key, using Hmac-SHA512, and signs the result.
bytearray signData ( any key, bytearray data)
Parameter | Description |
---|---|
| A private key object |
| The data to be signed |
Returns | A bytearray containing the digital signature |