coderslay
coderslay

Reputation: 14370

How to create PrivateKey from a password protected private key file?

I have a password protected private key file(I have the passowrd).

I need to put it in java.security.PrivateKey format. Can anyone tell me what is the most secure way to do it?

Upvotes: 0

Views: 969

Answers (1)

Uwe Plonus
Uwe Plonus

Reputation: 9954

If the key (with the certificates) is stored in PKCS#12 you can use the KeyStore from Java.

Else bouncy castle could help you (I've no experience with bouncy castle).

Upvotes: 1

Related Questions