public class RSAKeyPair extends Object
| Constructor and Description |
|---|
RSAKeyPair(int keySize) |
RSAKeyPair(String privateKeyFileName,
String publicKeyFileName) |
| Modifier and Type | Method and Description |
|---|---|
KeyPair |
getKeyPair() |
PrivateKey |
getPrivateKey() |
PublicKey |
getPublicKey() |
static PublicKey |
loadPublicKey(String publicKeyFileName) |
void |
writePrivateKey(String fileName) |
void |
writePublicKey(String fileName) |
public RSAKeyPair(int keySize)
throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionpublic RSAKeyPair(String privateKeyFileName, String publicKeyFileName) throws IOException
IOExceptionpublic KeyPair getKeyPair()
public PrivateKey getPrivateKey()
public PublicKey getPublicKey()
public void writePrivateKey(String fileName) throws IOException
IOExceptionpublic void writePublicKey(String fileName) throws IOException
IOExceptionpublic static PublicKey loadPublicKey(String publicKeyFileName) throws IOException
IOExceptionCopyright © 2018. All rights reserved.