Signature Functions(4.1)

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)
ParameterDescription

file

The file that contains the keystore dat

keystoreType

The keystore type e g . JKS, PKCS8, PKCS12 or CA_CERTIFICATES_PATH

password

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)
ParameterDescription

key

A private key object

data

The data to be signed

algorithm

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)
ParameterDescription

key

A private key object

data

The data to be signed

algorithm

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)
ParameterDescription

key

A private key object

data

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)
ParameterDescription

key

A private key object

data

The data to be signed

Returns

A bytearray containing the digital signature