Search for encrypted text in QR-code signatures
Leave feedback
GroupDocs.Signatureย provides ability to search over secure QR-code signature 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 search for secure QR-code text with standard encryption with GroupDocs.Signature:
Create new instance ofย Signatureย class and pass source document path or stream as a constructor parameter.
Compose object ofย SymmetricEncryptionย classย with same parameters as secured QR-code was signed with.
This example shows how to search for secure QR-code signature text.
using(Signaturesignature=newSignature("QRCodeEncryptedText.pdf")){// setup key and pasphrasestringkey="1234567890";stringsalt="1234567890";// create data encryptionIDataEncryptionencryption=newSymmetricEncryption(SymmetricAlgorithmType.Rijndael,key,salt);QrCodeSearchOptionsoptions=newQrCodeSearchOptions(){// specify special pages to search onAllPages=true,// specify special QRCode type to searchEncodeType=QrCodeTypes.QR,//DataEncryption=encryption};// search for signatures in documentList<QrCodeSignature>signatures=signature.Search<QrCodeSignature>(options);Console.WriteLine("\nSource document contains following signatures.");foreach(varqrCodeSignatureinsignatures){Console.WriteLine("QRCode signature found at page {0} with type {1} and text '{2}'",qrCodeSignature.PageNumber,qrCodeSignature.EncodeType.TypeName,qrCodeSignature.Text);}}
More resources
GitHub Examples
You may easily run the code above and see the feature in action in ourย GitHub examples: