public void VerifyCollectionImage() { // Set request var testFile = TestFiles.ImageStorageSigned.FirstOrDefault(); var fileInfo = testFile.GetFileInfo(); var signedFileName = $@"Output\ImageCollectionSigned.{testFile.Extension}"; var optionsBarcode = new VerifyBarcodeOptions(); TestsVerifyBarcode.PopulateOptions(optionsBarcode); //Digital verification is not supported for images var optionsQrCode = new VerifyQRCodeOptions(); TestsVerifyQrCode.PopulateOptions(optionsQrCode); //Text verification is not supported for images var verifySettings = new VerifySettings(); verifySettings.FileInfo = fileInfo; verifySettings.Options = new List <VerifyOptions>() { optionsBarcode, optionsQrCode }; var request = new VerifySignaturesRequest(verifySettings); // Get and check result var response = SignatureApi.VerifySignatures(request); CheckResponse(response, testFile); }
public static void PopulateOptions(VerifyQRCodeOptions options) { options.Page = 1; options.AllPages = true; options.PagesSetup = new PagesSetup() { EvenPages = false, FirstPage = true, LastPage = false, OddPages = false, PageNumbers = new List <int?>() { 1 } }; options.SignatureType = SignatureTypeEnum.QRCode; options.QRCodeType = "Aztec"; options.Text = "John Smith"; options.MatchType = VerifyQRCodeOptions.MatchTypeEnum.Contains; }
public void VerifyQrCodePresentation() { // Set request var testFile = TestFiles.PresentationStorageSigned.FirstOrDefault(); var fileInfo = testFile.GetFileInfo(); var options = new VerifyQRCodeOptions(); PopulateOptions(options); var verifySettings = new VerifySettings(); verifySettings.FileInfo = fileInfo; verifySettings.Options = new List <VerifyOptions>() { options }; var request = new VerifySignaturesRequest(verifySettings); // Get and check result var response = SignatureApi.VerifySignatures(request); CheckResponse(response, testFile); }
public void VerifyCollectionPdf() { // Set request var testFile = TestFiles.PdfStorageSigned.FirstOrDefault(); var fileInfo = testFile.GetFileInfo(); var signedFileName = $@"Output\PdfCollectionSigned.{testFile.Extension}"; var optionsBarcode = new VerifyBarcodeOptions(); TestsVerifyBarcode.PopulateOptions(optionsBarcode); var optionsQrCode = new VerifyQRCodeOptions(); TestsVerifyQrCode.PopulateOptions(optionsQrCode); var optionsDigital = new VerifyDigitalOptions(); TestsVerifyDigital.PopulateOptions(optionsDigital); var optionsText = new VerifyTextOptions(); TestsVerifyText.PopulateOptions(optionsText); var verifySettings = new VerifySettings(); verifySettings.FileInfo = fileInfo; verifySettings.Options = new List <VerifyOptions>() { optionsBarcode, optionsQrCode, optionsDigital, optionsText }; var request = new VerifySignaturesRequest(verifySettings); // Get and check result var response = SignatureApi.VerifySignatures(request); CheckResponse(response, testFile); }