public final class RSAKeysGenerator extends Object
Generator that can provide key pair for RSA encryption. This generator can be re-used for multiple key pair generations.
This class is immutable and can be considered thread safe.
| Modifier and Type | Class and Description |
|---|---|
static class |
RSAKeysGenerator.RSAKeys |
| Constructor and Description |
|---|
RSAKeysGenerator()
Creates a new generator of RSA keys with default 1024 size of the key.
|
RSAKeysGenerator(int keySize)
Creates a new generator of RSA keys with given key size.
|
| Modifier and Type | Method and Description |
|---|---|
KeyPair |
generateKeyPair()
Generates a new
KeyPair for RSA. |
RSAKeyParams[] |
generateKeys()
Generates a new RSA keys.
|
public RSAKeysGenerator()
public RSAKeysGenerator(int keySize)
throws EncryptionException
keySize - size of the keyEncryptionExceptionpublic RSAKeyParams[] generateKeys()
Copyright © 2019. All rights reserved.