public interface KeyPairGenerator
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_KEY_SIZE
the default key size in bits
|
static String |
KEY_ALGORITHM
the algorithm to be used for encryption
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
generateKeyPair(String userId,
String password,
int keySize,
OutputStream publicKey,
OutputStream secrectKey)
generates a key pair for the given user id with a custom key size
|
boolean |
generateKeyPair(String userId,
String password,
OutputStream publicKey,
OutputStream secrectKey)
generates a key pair for the given user id with the default key size ( KeyPairGenerator#DEFAULT_KEY_SIZE )
|
static final String KEY_ALGORITHM
static final int DEFAULT_KEY_SIZE
boolean generateKeyPair(String userId, String password, OutputStream publicKey, OutputStream secrectKey)
userId - the user id for the PGP key pairpassword - the password used to secure the secret (private) keypublicKey - the target stream for the public keysecrectKey - the target stream for the secret (private) keyboolean generateKeyPair(String userId, String password, int keySize, OutputStream publicKey, OutputStream secrectKey)
userId - the user id for the PGP key pairpassword - the password used to secure the secret (private) keykeySize - the custom key sizepublicKey - the target stream for the public keysecrectKey - the target stream for the secret (private) keyCopyright © 2015. All rights reserved.