|
Bouncy Castle Cryptography 1.51 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bouncycastle.openpgp.operator.jcajce.JcePGPDataEncryptorBuilder
public class JcePGPDataEncryptorBuilder
PGPDataEncryptorBuilder
implementation that sources cryptographic primitives using the
JCE APIs.
setProvider(String)
methods.
Constructor Summary | |
---|---|
JcePGPDataEncryptorBuilder(int encAlgorithm)
Constructs a new data encryptor builder for a specified cipher type. |
Method Summary | |
---|---|
PGPDataEncryptor |
build(byte[] keyBytes)
Builds a data encryptor using the algorithm configured for this builder. |
int |
getAlgorithm()
The encryption algorithm used by data encryptors created by this builder. |
java.security.SecureRandom |
getSecureRandom()
Gets the SecureRandom instance used by this builder. |
JcePGPDataEncryptorBuilder |
setProvider(java.security.Provider provider)
Sets the JCE provider to source cryptographic primitives from. |
JcePGPDataEncryptorBuilder |
setProvider(java.lang.String providerName)
Sets the JCE provider to source cryptographic primitives from. |
JcePGPDataEncryptorBuilder |
setSecureRandom(java.security.SecureRandom random)
Provide a user defined source of randomness. |
JcePGPDataEncryptorBuilder |
setWithIntegrityPacket(boolean withIntegrityPacket)
Sets 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 |
---|
public JcePGPDataEncryptorBuilder(int encAlgorithm)
encAlgorithm
- one of the supported symmetric cipher
algorithms
. May not be SymmetricKeyAlgorithmTags.NULL
.Method Detail |
---|
public JcePGPDataEncryptorBuilder setWithIntegrityPacket(boolean withIntegrityPacket)
withIntegrityPacket
- true if an integrity packet is to be included, false otherwise.
public JcePGPDataEncryptorBuilder setProvider(java.security.Provider provider)
provider
- the JCE provider to use.
public JcePGPDataEncryptorBuilder setProvider(java.lang.String providerName)
providerName
- the name of the JCE provider to use.
public JcePGPDataEncryptorBuilder setSecureRandom(java.security.SecureRandom random)
random
- the secure random to be used.
public int getAlgorithm()
PGPDataEncryptorBuilder
getAlgorithm
in interface PGPDataEncryptorBuilder
symmetric encryption algorithms
.public java.security.SecureRandom getSecureRandom()
PGPDataEncryptorBuilder
SecureRandom
is
constructed and retained by the this builder.
getSecureRandom
in interface PGPDataEncryptorBuilder
public PGPDataEncryptor build(byte[] keyBytes) throws PGPException
PGPDataEncryptorBuilder
build
in interface PGPDataEncryptorBuilder
keyBytes
- the bytes of the key to use for the cipher.
PGPException
- if an error occurs initialising the configured encryption.
|
Bouncy Castle Cryptography 1.51 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |