ByteArrayOutputStream bcOut = new ByteArrayOutputStream();
PGPEncryptedDataGenerator encGen = new PGPEncryptedDataGenerator(SymmetricKeyAlgorithmTags.AES_128, true, new SecureRandom(), "BC");
encGen.addMethod(pgpPubKey);
encGen.addMethod("password".toCharArray());
OutputStream cOut = encGen.open(bcOut, bytes.length);