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 Apps

Along with the full-featured .NET library, we provide simple but powerful free online apps.

To generate QR codes and/or sign your files with QR codes for free, you can use the QR Code Generator online app.

To sign PDF, Word, Excel, PowerPoint, and other documents you can use the other online apps from the GroupDocs.Signature App Product Family.