Sign documents with encrypted QR-code text

GroupDocs.Signature provides ability to secure QR-code signature text with standard or custom encryption. Standard encryption is implemented over class SymmetricEncryption class. Creation of this object expects 3 arguments like encryption algorithm enumeration SymmetricAlgorithmType with one of following values (DES, TripleDES, RC2, Rijndael), string value key and string value salt.

Here are the steps to secure QR-code text with standard encryption with GroupDocs.Signature:

This example shows how to sign document with secure QR-code signature text.

using (Signature signature = new Signature("sample.pdf"))
    // setup key and passphrase
    string key = "1234567890";
    string salt = "1234567890";
    // create data encryption
    IDataEncryption encryption = new SymmetricEncryption(SymmetricAlgorithmType.Rijndael, key, salt);
    // setup QR-Code options
    QrCodeSignOptions options = new QrCodeSignOptions()
        //setup text to be secured
        Text = "This is private text to be secured.",
        EncodeType = QrCodeTypes.QR,
        // specify text encryption
        DataEncryption = encryption,
        // locate and aligh signature
        Height = 100,
        Width = 100,
        VerticalAlignment = VerticalAlignment.Bottom,
        HorizontalAlignment = HorizontalAlignment.Right,
        Margin = new Padding() {  Right = 10, Bottom = 10}
    // sign document to file
    signature.Sign("QRCodeEncryptedText.pdf", options);

More resources

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples:

Free Online App 

Along with full-featured .NET library we provide simple, but powerful free Apps.
You are welcome to eSign PDF, Word, Excel, PowerPoint documents with free to use online GroupDocs Signature App.