public class RSAKeyEncoder extends Object
| Constructor and Description |
|---|
RSAKeyEncoder() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getPKCS1Encoded(RSAPublicKey publicKey)
Return the PKCS1 encoded representation of the specified RSAPublicKey.
|
RSAPublicKey |
parsePEMPublicKey(String pem)
Parse a PKCS1 PEM encoded RSA public key into the modulus/exponent components
and construct a new RSAPublicKey
|
public RSAPublicKey parsePEMPublicKey(String pem) throws GeneralSecurityException
pem - The PEM encoded string to parse.GeneralSecurityException - If an error occurs while parsing the pem argument or creating the RSA key.public byte[] getPKCS1Encoded(RSAPublicKey publicKey)
publicKey - The RSA public key to encode.Copyright © 2015. All rights reserved.