org.bouncycastle.openpgp.operator.bc
Class BcPGPDataEncryptorBuilder
java.lang.Object
org.bouncycastle.openpgp.operator.bc.BcPGPDataEncryptorBuilder
- All Implemented Interfaces:
- PGPDataEncryptorBuilder
public class BcPGPDataEncryptorBuilder
- extends java.lang.Object
- implements PGPDataEncryptorBuilder
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BcPGPDataEncryptorBuilder
public BcPGPDataEncryptorBuilder(int encAlgorithm)
setWithIntegrityPacket
public BcPGPDataEncryptorBuilder setWithIntegrityPacket(boolean withIntegrityPacket)
- Determine whether or not the resulting encrypted data will be protected using an integrity packet.
- Parameters:
withIntegrityPacket
- true if an integrity packet is to be included, false otherwise.
- Returns:
- the current builder.
setSecureRandom
public BcPGPDataEncryptorBuilder setSecureRandom(java.security.SecureRandom random)
- Provide a user defined source of randomness.
- Parameters:
random
- the secure random to be used.
- Returns:
- the current builder.
getAlgorithm
public int getAlgorithm()
- Specified by:
getAlgorithm
in interface PGPDataEncryptorBuilder
getSecureRandom
public java.security.SecureRandom getSecureRandom()
- Specified by:
getSecureRandom
in interface PGPDataEncryptorBuilder
build
public PGPDataEncryptor build(byte[] keyBytes)
throws PGPException
- Specified by:
build
in interface PGPDataEncryptorBuilder
- Throws:
PGPException