• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

PGP Encryption Decryption

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Friends,

I have to use PGP encryption and decryption by java.I am using bouncycastle API to achieve the same.
My string is getting encrypted successfully,but when i am decrypting the same getting one below exception.

Exception in thread "main" org.bouncycastle.openpgp.PGPException: unknown hash algorithm: 8


Exception is coming in findSecretKey metthod.

Friends anyone have idea about this exception.It little bit urgent.If any one need code that i have written,i can share the same.

Thanks & Regards
Amitabh Pandey
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please do share the code you wrote for encrypting and decrypting, that will make it a lot easier to tell what might be wrong.
 
Amitabhk Pandey
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jesper,

Thanks for your reply.below is my code.In same file encryption and decryption is happening.
Encryption is working.Problem is in Decryption.Below two jars i am using for the same.

1-bcpg-jdk16-145.jar
2-bcprov-jdk16-145.jar




Let me know if you need anything else.

Thanks & Regards
Amitabh
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where you able to resolve?
 
Marshal
Posts: 79254
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
AP hasn't been here for 2½ years; you might never get a reply, I am afraid.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic