0

I want to use the RSA private key in my project using Java. I do have the key in file using PEM format. I want to use this private key into my project to decrypt the messages which are encrypted using my public key.

What is the method/standard classes I can use to read and decode the private key from the PEM file? I don't want to use the openssl or any other libraries/classes to do this. An example or sample code will be really helpful.

Vishal N

1 Answer 1

1

The Bouncycastle PEMReader class will do what you want. If you insist on not using the Bouncycastle library then you can simply look at the source code for the class to see how they do it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.