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 a EC key pair.
|
static KeyPair |
generateEC(SecureRandom random,
String namedCurve)
Generates a EC key pair.
|
static KeyPair |
generateRSA(SecureRandom random,
int bitLength)
Generates a 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 © 2016 JBoss by Red Hat. All rights reserved.