public final class KeyPairGenerator extends Object
Modifier and Type | Method and Description |
---|---|
static KeyPair |
generateDSA(SecureRandom random,
int bitLength)
Generates a DSA key pair.
|
static KeyPair |
generateEC(SecureRandom random,
int bitLength)
Generates an EC key pair.
|
static KeyPair |
generateEC(SecureRandom random,
String namedCurve)
Generates an EC key pair.
|
static KeyPair |
generateRSA(SecureRandom random,
int bitLength)
Generates an RSA key pair.
|
public static KeyPair generateDSA(SecureRandom random, int bitLength)
random
- Random source required for key generation.bitLength
- Desired key size in bits.public static KeyPair generateRSA(SecureRandom random, int bitLength)
random
- Random source required for key generation.bitLength
- Desired key size in bits.public static KeyPair generateEC(SecureRandom random, int bitLength)
random
- Random source required for key generation.bitLength
- Desired key size in bits.public static KeyPair generateEC(SecureRandom random, String namedCurve)
random
- Random source required for key generation.namedCurve
- Well-known elliptic curve name that includes domain parameters including key size.Copyright © 2003-2024 Virginia Tech. All Rights Reserved.