This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to store PublicKey and PrivateKey in database??

Jahnvi Vyas
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am developing web application using JSP and MySql 5.1. I want to store PublicKey as well PrivateKey in my database.

The data type which I use to store key is BLOB. But I dont know how to store or retrive this. I tried with byte[]. By doing this I am able to store and retrive key, but it is as byte[] datatype. I want to retrive this as PublicKey or PrivateKey and there are no ways to convert byte[] to and Key type.

So, where am I goin wrong?? Are there any other ways to store and retrive Key??? And which datatype I should use for field??


It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic