• 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

Java PrivateKey DerInputStream.getLength(): lengthTag=109 too big

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
This is my first post and I'm glad to be here. I am having a problem with my code. I am trying to extract a key from a created file, and then turn this into a private key which then is used to encrpt a big integer. The problem I am getting is when the Private Key is created I am getting the following error.

I have looked everywhere I can't seem to find an answer on why this doesn't work. Here is an example of a key that is generated in a separate file, provided to me.


Finally here is the code where I am getting the key from the file and then trying to construct a private key:


From this private Key I am trying to get the modulus and the private exponent.
Thank you very much for taking the time to read this.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic