public abstract class BaseKeyPairGenerator extends Object implements KeyPairGenerator
DEFAULT_KEY_SIZE, KEY_ALGORITHM| Modifier | Constructor and Description |
|---|---|
protected |
BaseKeyPairGenerator() |
| Modifier and Type | Method and Description |
|---|---|
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 )
|
protected int |
getEncryptionAlgorithm()
the strongest allowed encryption algorithm
|
protected int |
getEncryptionKeyType()
accessor to the defined encryption key type
|
protected int[] |
getPreferredCompressionAlgorithms()
accessor to the preferred standard compression algorithms
|
protected int[] |
getPreferredEncryptionAlgorithms()
accessor to the preferred standard encryption algorithms
|
protected int[] |
getPreferredHashingAlgorithms()
accessor to the preferred standard hashing algorithms
|
protected abstract String |
getProvider()
the provider identifier
|
protected SecureRandom |
getSecureRandom()
provides access to a securely initialized SecureRandom generator
|
protected int |
getSigningKeyType()
accessor to the defined signing key type
|
void |
setUnlimitedStrengthEncryption(boolean unlimitedStrengthEncryption)
set the unlimited strength encryption flag
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgenerateKeyPairprotected SecureRandom getSecureRandom()
protected int getSigningKeyType()
protected int getEncryptionKeyType()
protected int[] getPreferredEncryptionAlgorithms()
protected int[] getPreferredHashingAlgorithms()
protected int[] getPreferredCompressionAlgorithms()
protected abstract String getProvider()
protected int getEncryptionAlgorithm()
public void setUnlimitedStrengthEncryption(boolean unlimitedStrengthEncryption)
unlimitedStrengthEncryption - public boolean generateKeyPair(String userId, String password, OutputStream publicKey, OutputStream secrectKey)
KeyPairGeneratorgenerateKeyPair in interface KeyPairGeneratoruserId - 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) keyKeyPairGenerator.generateKeyPair(String, String, OutputStream, OutputStream)Copyright © 2015. All rights reserved.