signAndEncrypt();
decrypt();
}
private static void signAndEncrypt() throws Exception {
FileEncryptor enc = new FileEncryptor(BouncyCastlePgpProvider.getInstance().getEncryptor());
enc.setArmor(true);
Key encryptionKey = new FileBasedKey(new File(root, "receiver\\pubring.gpg"),
"Receiver <receiver@jitterbit.com>");
Key signatureKey = new FileBasedKey(new File(root, "sender\\secring.gpg"));
enc.signAndEncrypt(clearTextMessage, signedAndEncryptedMessage, encryptionKey, signatureKey,
"sender".toCharArray());
}