org.bouncycastle.openpgp.operator.jcajce
Class JcePBEKeyEncryptionMethodGenerator
java.lang.Object
org.bouncycastle.openpgp.operator.PGPKeyEncryptionMethodGenerator
org.bouncycastle.openpgp.operator.PBEKeyEncryptionMethodGenerator
org.bouncycastle.openpgp.operator.jcajce.JcePBEKeyEncryptionMethodGenerator
public class JcePBEKeyEncryptionMethodGenerator
- extends PBEKeyEncryptionMethodGenerator
JCE based generator for password based encryption (PBE) data protection methods.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JcePBEKeyEncryptionMethodGenerator
public JcePBEKeyEncryptionMethodGenerator(char[] passPhrase,
PGPDigestCalculator s2kDigestCalculator)
- Create a PBE encryption method generator using the provided calculator for key calculation.
- Parameters:
passPhrase
- the passphrase to use as the primary source of key material.s2kDigestCalculator
- the digest calculator to use for key calculation.
JcePBEKeyEncryptionMethodGenerator
public JcePBEKeyEncryptionMethodGenerator(char[] passPhrase)
- Create a PBE encryption method generator using the default SHA-1 digest calculator for key calculation.
- Parameters:
passPhrase
- the passphrase to use as the primary source of key material.
setProvider
public JcePBEKeyEncryptionMethodGenerator setProvider(java.security.Provider provider)
setProvider
public JcePBEKeyEncryptionMethodGenerator setProvider(java.lang.String providerName)
setSecureRandom
public PBEKeyEncryptionMethodGenerator setSecureRandom(java.security.SecureRandom random)
- Provide a user defined source of randomness.
- Overrides:
setSecureRandom
in class PBEKeyEncryptionMethodGenerator
- Parameters:
random
- the secure random to be used.
- Returns:
- the current generator.
encryptSessionInfo
protected byte[] encryptSessionInfo(int encAlgorithm,
byte[] key,
byte[] sessionInfo)
throws PGPException
- Specified by:
encryptSessionInfo
in class PBEKeyEncryptionMethodGenerator
- Throws:
PGPException