org.bouncycastle.openpgp.operator.bc
Class BcPBEKeyEncryptionMethodGenerator
java.lang.Object
org.bouncycastle.openpgp.operator.PGPKeyEncryptionMethodGenerator
org.bouncycastle.openpgp.operator.PBEKeyEncryptionMethodGenerator
org.bouncycastle.openpgp.operator.bc.BcPBEKeyEncryptionMethodGenerator
public class BcPBEKeyEncryptionMethodGenerator
- extends PBEKeyEncryptionMethodGenerator
A BC lightweight method generator for supporting PBE based encryption operations.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BcPBEKeyEncryptionMethodGenerator
public BcPBEKeyEncryptionMethodGenerator(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.
BcPBEKeyEncryptionMethodGenerator
public BcPBEKeyEncryptionMethodGenerator(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.
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