Simple Java program to convert String to RSAPrivateKey and RSAPublicKey

Usage

RSAParser parser=new RSAParserImpl(KeyFactory.getInstance("RSA"));
        parser.parsePrivateKey("PRIVATE_KEY")
        parser.parsePublicKey("PUBLIC_KEY")

parsePrivateKey() and parsePublicKey() methods can throw RSAParserExceptionwhen error occur during parsing.