Sign (PKE)

mySymEncModule.Sign(encryptedData);

myPKEModuleThe name of the Public Key Encryption module structure
inputDataThe data to sign in DATA format
Return:Computed Digital signature

The Sign function creates a digital signature of the given inputData, using the options specified in the Public Key Encryption module definition.

Example:

IMPORT STD;
privKeyFile := '/var/lib/HPCCSystems/myesp/test.key';
pubKeyFile :=  '/var/lib/HPCCSystems/myesp/test.key.pub';

//PKE Encryption module definition
myPKEModule := STD.Crypto.PublicKeyEncryption('RSA', pubKeyFile, privKeyFile,''); 

DATA signature := myPKEModule.Sign((DATA)'The quick brown fox jumps');
OUTPUT(TRUE = myPKEModule.VerifySignature(signature, (DATA)'The quick brown fox jumps'));