This example shows how to encrypt QR-code signature.
Signaturesignature=newSignature("sample.pdf"))// setup key and passphrase
Stringkey="1234567890";Stringsalt="1234567890";// create data encryption
IDataEncryptionencryption=newSymmetricEncryption(SymmetricAlgorithmType.Rijndael,key,salt);// setup QR-Code options
QrCodeSignOptionsoptions=newQrCodeSignOptions();options.setEncodeType(QrCodeTypes.QR);// setup Data property to Address instance
options.setData(address);// set right bottom corner
options.setHorizontalAlignment(HorizontalAlignment.Right);options.setVerticalAlignment(VerticalAlignment.Bottom);options.setMargin(newPadding(10));options.setWidth(100);options.setHeight(100);// sign document to file
signature.sign("QrCodeEncrypted.pdf",options);
More resources
GitHub Examples
You may easily run the code above and see the feature in action in our GitHub examples: