I have a PKCS#8 private key as a string in a variable. How to convert that into a PKCS#1 private key as a string
In other words, how to convert the below content
-----BEGIN PRIVATE KEY-----
-----END PRIVATE KEY-----
to
-----BEING RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----
using java
PS: There is a straight forward solution in python here - Python convert Private Key to RSA Key Can some please give some pointers on how to do in Java