Package org.apache.poi.poifs.crypt.agile

Examples of org.apache.poi.poifs.crypt.agile.AgileEncryptionVerifier


   
    @Test
    public void testCertificateEncryption() throws Exception {
        POIFSFileSystem fs = new POIFSFileSystem();
        EncryptionInfo info = new EncryptionInfo(fs, EncryptionMode.agile, CipherAlgorithm.aes128, HashAlgorithm.sha1, -1, -1, ChainingMode.cbc);
        AgileEncryptionVerifier aev = (AgileEncryptionVerifier)info.getVerifier();
        CertData certData = loadKeystore();
        aev.addCertificate(certData.x509);
       
        Encryptor enc = info.getEncryptor();
        enc.confirmPassword("foobaa");
       
        File file = POIDataSamples.getDocumentInstance().getFile("VariousPictures.docx");
View Full Code Here

TOP

Related Classes of org.apache.poi.poifs.crypt.agile.AgileEncryptionVerifier

Copyright © 2018 www.massapicom. 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.