Bouncy Castle Cryptography Library 1.49

org.bouncycastle.openpgp.operator.jcajce
Class JcePGPDataEncryptorBuilder

java.lang.Object
  extended by org.bouncycastle.openpgp.operator.jcajce.JcePGPDataEncryptorBuilder
All Implemented Interfaces:
PGPDataEncryptorBuilder

public class JcePGPDataEncryptorBuilder
extends java.lang.Object
implements PGPDataEncryptorBuilder


Constructor Summary
JcePGPDataEncryptorBuilder(int encAlgorithm)
           
 
Method Summary
 PGPDataEncryptor build(byte[] keyBytes)
           
 int getAlgorithm()
           
 java.security.SecureRandom getSecureRandom()
           
 JcePGPDataEncryptorBuilder setProvider(java.security.Provider provider)
           
 JcePGPDataEncryptorBuilder setProvider(java.lang.String providerName)
           
 JcePGPDataEncryptorBuilder setSecureRandom(java.security.SecureRandom random)
          Provide a user defined source of randomness.
 JcePGPDataEncryptorBuilder setWithIntegrityPacket(boolean withIntegrityPacket)
          Determine whether or not the resulting encrypted data will be protected using an integrity packet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JcePGPDataEncryptorBuilder

public JcePGPDataEncryptorBuilder(int encAlgorithm)
Method Detail

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

Bouncy Castle Cryptography Library 1.49