public class RSAKeyPair extends AsymmetricCryptoKeyPair
Modifier and Type | Field and Description |
---|---|
static int |
KEY_LENGTH_2048 |
KEY_LENGTH_1024, KEY_LENGTH_512
Constructor and Description |
---|
RSAKeyPair(MyRSAPrivateKey a_privateKey)
Creates a new rsa key pair.
|
Modifier and Type | Method and Description |
---|---|
static RSAKeyPair |
getInstance(java.math.BigInteger a_publicExponent,
java.security.SecureRandom a_random,
int a_strength,
int a_certainty)
Creates a new rsa key pair.
|
static RSAKeyPair |
getInstance(java.security.SecureRandom a_random,
int a_strength,
int a_certainty)
Creates a new rsa key pair with a public exponent of 65537.
|
createPublicKey, getPrivate, getPublic, isValidKeyPair
public static final int KEY_LENGTH_2048
public RSAKeyPair(MyRSAPrivateKey a_privateKey)
a_privateKey
- an rsa private keypublic static RSAKeyPair getInstance(java.math.BigInteger a_publicExponent, java.security.SecureRandom a_random, int a_strength, int a_certainty)
a_publicExponent
- the public encyption exponent; a small integer denoted e,
often a prime close to a power of 2, for example
3, 5, 7, 17, 257, or 65537.a_random
- a random number generatora_strength
- The bit-length of n = p*q.a_certainty
- The certainty, that the generated numbers are prime.public static RSAKeyPair getInstance(java.security.SecureRandom a_random, int a_strength, int a_certainty)
a_random
- a random number generatora_strength
- The bit-length of n = p*q.a_certainty
- The certainty, that the generated numbers are prime.Copyright © 2023. All rights reserved.