Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Security and the fly likes How to store PublicKey and PrivateKey in database?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "How to store PublicKey and PrivateKey in database??" Watch "How to store PublicKey and PrivateKey in database??" New topic
Author

How to store PublicKey and PrivateKey in database??

Jahnvi Vyas
Ranch Hand

Joined: May 03, 2006
Posts: 36
Hello,

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??

Thanks.

Jahnvi..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to store PublicKey and PrivateKey in database??
 
Similar Threads
Generating Public and Private keys.
public key retrieval from DB incorrect
Store PrivateKey PublicKey in DB
StreamCurruptedException
How to store PublicKey and PrivateKey in database??