CertificateEncryption - sign(String certificateID, String alias, String aliaspassword, String algorithm, String datatosign)

Signs the data using the private key and the given algorithm.

Table 1. Parameters
Name Type Description
certificateID String sys_id of the certificate record in the X.509 Certificate [sys_certificate] table.
alias String Private key name.
aliaspassword String Password for the private key.
datatosign String Data to sign.
algorithm String SHA-1, SHA-256, and so on.
Table 2. Returns
Type Description
String Signed data in base64 format.
var ce = new CertificateEncryption;
ce.sign("recordID", "alias", "password", "SHA-1", "sign this data");