I have created a keystore and it includes private key and public key. I need to retrieve my public key and private key using java codes. I found a method to retrieve the private key from here. But I cannot find a way to retrieve the public key. Can anyone tell me a way to take my public key out
Asked
Active
Viewed 91 times
0
-
http://www.java2s.com/Code/Java/Security/RetrievingaKeyPairfromaKeyStore.htm – Alexandre Santos May 27 '14 at 05:24
-
I do not need the key pair, i need only the public key – buddhi weerasinghe May 27 '14 at 18:20
1 Answers
0
The zeroth entry of the corresponding certificate chain contains the corresponding public key.

user207421
- 305,947
- 44
- 307
- 483