Examples of signDetached()


Examples of org.apache.pdfbox.examples.signature.CreateSignature.signDetached()

        KeyStore keystore = KeyStore.getInstance("PKCS12");
        keystore.load(new FileInputStream(keystorePath), password.toCharArray());

        // sign PDF
        CreateSignature signing = new CreateSignature(keystore, password.toCharArray());
        signing.signDetached(new File(inDir + "sign_me.pdf"), new File(outDir + "signed.pdf"));

        // TODO verify the signed PDF file
    }

    /**
 
View Full Code Here

Examples of org.apache.pdfbox.examples.signature.CreateSignature.signDetached()

        try
        {
            String inPath = inDir + "sign_me_tsa.pdf";
            String outPath = outDir + "signed_tsa.pdf";
            CreateSignature signing = new CreateSignature(keystore, password.toCharArray());
            signing.signDetached(new File(inPath), new File(outPath), tsaClient);
        }
        catch (IOException e)
        {
            assertTrue(e.getCause() instanceof TSPValidationException);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.