Package org.jitterbit.crypto.pgp

Examples of org.jitterbit.crypto.pgp.PassphraseCrypto.decrypt()


    @Test
    public void run() {
        try {
            PassphraseCrypto crypto = BouncyCastlePgpProvider.getInstance().getPassphraseCrypto();
            byte[] encrypted = crypto.encrypt(MESSAGE.getBytes(), PASSPHRASE, SymmetricKeyAlgorithm.CAST5);
            byte[] decrypted = crypto.decrypt(encrypted, PASSPHRASE);
            assertEquals(MESSAGE, new String(decrypted));
        }
        catch (IOException ex) {
            ex.printStackTrace();
            fail();
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.