public class Keys extends Object
Modifier and Type | Method and Description |
---|---|
static KeyPair |
dsa()
DSA key pair of size
|
static KeyPair |
keyPair(String algorithm)
Generate an asymmetric key pair of size for the supplied
algorithm |
static KeyPair |
keyPair(String algorithm,
int keysize)
Generate an asymmetric key pair of size
keysize for the supplied algorithm |
static KeyPair |
rsa()
RSA key pair of size
|
public static KeyPair rsa()
UncheckedSecurityException
- if a NoSuchAlgorithmException
is thrownpublic static KeyPair dsa()
UncheckedSecurityException
- if a NoSuchAlgorithmException
is thrownpublic static KeyPair keyPair(String algorithm)
algorithm
algorithm
- e.g. RSA, DSAalgorithm
UncheckedSecurityException
- if a NoSuchAlgorithmException
is thrownpublic static KeyPair keyPair(String algorithm, int keysize)
keysize
for the supplied algorithm
algorithm
- e.g. RSA, DSAkeysize
- algorithm
UncheckedSecurityException
- if a NoSuchAlgorithmException
is thrownCopyright © 2017–2018 earcam. All rights reserved.