|
Bouncy Castle Cryptography Library 1.79 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.bouncycastle.openpgp.operator.PGPKeyEncryptionMethodGenerator | +--org.bouncycastle.openpgp.operator.PBEKeyEncryptionMethodGenerator | +--org.bouncycastle.openpgp.operator.jcajce.JcePBEKeyEncryptionMethodGenerator
JCE based generator for password based encryption (PBE) data protection methods.
Constructor Summary | |
JcePBEKeyEncryptionMethodGenerator(char[] passPhrase)
Create a PBE encryption method generator using the default SHA-1 digest and the default S2K count for key generation. |
|
JcePBEKeyEncryptionMethodGenerator(char[] passPhrase,
int s2kCount)
Create a PBE encryption method generator using the default SHA-1 digest calculator and a S2K count other than the default for key generation. |
|
JcePBEKeyEncryptionMethodGenerator(char[] passPhrase,
PGPDigestCalculator s2kDigestCalculator)
Create a PBE encryption method generator using the provided digest and the default S2K count for key generation. |
|
JcePBEKeyEncryptionMethodGenerator(char[] passPhrase,
PGPDigestCalculator s2kDigestCalculator,
int s2kCount)
Create a PBE encryption method generator using the provided calculator and S2K count for key generation. |
Method Summary | |
protected byte[] |
encryptSessionInfo(int encAlgorithm,
byte[] key,
byte[] sessionInfo)
|
protected byte[] |
generateV6KEK(int kekAlgorithm,
byte[] ikm,
byte[] info)
|
protected byte[] |
getEskAndTag(int kekAlgorithm,
int aeadAlgorithm,
byte[] sessionInfo,
byte[] key,
byte[] iv,
byte[] info)
|
JcePBEKeyEncryptionMethodGenerator |
setProvider(java.security.Provider provider)
Sets the JCE provider to source cryptographic primitives from. |
JcePBEKeyEncryptionMethodGenerator |
setProvider(java.lang.String providerName)
Sets the JCE provider to source cryptographic primitives from. |
PBEKeyEncryptionMethodGenerator |
setSecureRandom(java.security.SecureRandom random)
Sets a user defined source of randomness. |
Methods inherited from class org.bouncycastle.openpgp.operator.PBEKeyEncryptionMethodGenerator |
generate, generateV5, generateV6, getKey, getSessionKeyWrapperAlgorithm, setSessionKeyWrapperAlgorithm |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JcePBEKeyEncryptionMethodGenerator(char[] passPhrase, PGPDigestCalculator s2kDigestCalculator)
passPhrase
- the passphrase to use as the primary source of key material.s2kDigestCalculator
- the digest calculator to use for key calculation.public JcePBEKeyEncryptionMethodGenerator(char[] passPhrase)
passPhrase
- the passphrase to use as the primary source of key material.public JcePBEKeyEncryptionMethodGenerator(char[] passPhrase, PGPDigestCalculator s2kDigestCalculator, int s2kCount)
passPhrase
- the passphrase to use as the primary source of key material.s2kDigestCalculator
- the digest calculator to use for key calculation.s2kCount
- the single byte S2K
count to use.public JcePBEKeyEncryptionMethodGenerator(char[] passPhrase, int s2kCount)
passPhrase
- the passphrase to use as the primary source of key material.s2kCount
- the single byte S2K
count to use.Method Detail |
public JcePBEKeyEncryptionMethodGenerator setProvider(java.security.Provider provider)
provider
- the JCE provider to use.public JcePBEKeyEncryptionMethodGenerator setProvider(java.lang.String providerName)
providerName
- the name of the JCE provider to use.public PBEKeyEncryptionMethodGenerator setSecureRandom(java.security.SecureRandom random)
PBEKeyEncryptionMethodGenerator
If no SecureRandom is configured, a default SecureRandom will be used.
setSecureRandom
in class PBEKeyEncryptionMethodGenerator
org.bouncycastle.openpgp.operator.PBEKeyEncryptionMethodGenerator
protected byte[] encryptSessionInfo(int encAlgorithm, byte[] key, byte[] sessionInfo) throws PGPException
encryptSessionInfo
in class PBEKeyEncryptionMethodGenerator
protected byte[] generateV6KEK(int kekAlgorithm, byte[] ikm, byte[] info)
generateV6KEK
in class PBEKeyEncryptionMethodGenerator
protected byte[] getEskAndTag(int kekAlgorithm, int aeadAlgorithm, byte[] sessionInfo, byte[] key, byte[] iv, byte[] info) throws PGPException
getEskAndTag
in class PBEKeyEncryptionMethodGenerator
|
Bouncy Castle Cryptography Library 1.79 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |