Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error while using PGP Encryption on windows

kiran krishna
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Following is the script of code and I am using GPG encryption on windows.

PGPEncryptedDataGenerator encryptGenerator = new PGPEncryptedDataGenerator(PGPEncryptedDataGenerator.CAST5, new SecureRandom(), "BC");
outputStream =, compressedBytes.length);

I am getting the following error at the last line

org.bouncycastle.openpgp.PGPException: exception encrypting session key
at com.effigent.projectadjuncts.BCPGPCrypto.encryptedBytes(
at com.effigent.projectadjuncts.BCPGPCrypto.encryptedBytes(
at Application.<init>(
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
at java.lang.reflect.Constructor.newInstance(
at java.lang.Class.newInstance0(
at java.lang.Class.newInstance(
at com.webobjects.appserver.WOApplication.main(
at Application.main(

If some one has any solution please provide

Thanks in Advance
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic