Hi, How can I read pem formated private keys using java classes. I am trying to pass it to PKCS8EncodedKeySpec and then using this in KeyFactory to generate private key.But at this step I get error...Should I decode (Base64)and remove the -----BEGIN RSA private KEY--- ----END RSA PRIVATE KEY-- Strings before passing this to PKCS8EncodedKeySpec ??
posted 9 years ago
Seems I can use Bouncycastle apis for the purpose.It has PEMReader,PEMWriter classes.