org.bouncycastle.openpgp.operator.jcajce
Class JcePGPDataEncryptorBuilder
java.lang.Object
org.bouncycastle.openpgp.operator.jcajce.JcePGPDataEncryptorBuilder
- All Implemented Interfaces:
- PGPDataEncryptorBuilder
public class JcePGPDataEncryptorBuilder
- extends java.lang.Object
- implements PGPDataEncryptorBuilder
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JcePGPDataEncryptorBuilder
public JcePGPDataEncryptorBuilder(int encAlgorithm)
setWithIntegrityPacket
public JcePGPDataEncryptorBuilder 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.
setProvider
public JcePGPDataEncryptorBuilder setProvider(java.security.Provider provider)
setProvider
public JcePGPDataEncryptorBuilder setProvider(java.lang.String providerName)
setSecureRandom
public JcePGPDataEncryptorBuilder 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