• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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: 73989
332
  • 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.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic