PGPDataEncryptor instances, which can be used to encrypt data objects.
| Modifier and Type | Method and Description |
|---|---|
| public PGPDataEncryptor | Returns: a data encryptor with an initialised cipher.the bytes of the key to use for the cipher. keyBytes)Builds a data encryptor using the algorithm configured for this builder. |
| public int | |
| public int | Returns: one of thesymmetric encryption algorithms.The encryption algorithm used by data encryptors created by this builder. |
| public int | |
| public SecureRandom | |
| public boolean | |
| public PGPDataEncryptorBuilder | |
| public PGPDataEncryptorBuilder | |
| public PGPDataEncryptorBuilder | Returns: the current builderthe AEAD mode to use. aeadAlgorithm, int the size of the chunks to be processed with each nonce. chunkSize)Sets whether the resulting encrypted data will be protected using an AEAD mode. |
| public PGPDataEncryptorBuilder | Returns: the current builder.true if an integrity packet is to be included, false otherwise. withIntegrityPacket)Sets whether or not the resulting encrypted data will be protected using an integrity packet. |
| build | back to summary |
|---|---|
| public PGPDataEncryptor build(byte[] keyBytes) throws PGPException Builds a data encryptor using the algorithm configured for this builder.
| |
| getAeadAlgorithm | back to summary |
|---|---|
| public int getAeadAlgorithm() | |
| getAlgorithm | back to summary |
|---|---|
| public int getAlgorithm() The encryption algorithm used by data encryptors created by this builder.
| |
| getChunkSize | back to summary |
|---|---|
| public int getChunkSize() | |
| getSecureRandom | back to summary |
|---|---|
| public SecureRandom getSecureRandom() Gets the SecureRandom instance used by this builder.
If a SecureRandom has not been explicitly configured, a default | |
| isV5StyleAEAD | back to summary |
|---|---|
| public boolean isV5StyleAEAD() | |
| setUseV5AEAD | back to summary |
|---|---|
| public PGPDataEncryptorBuilder setUseV5AEAD() Specify we are using V5 AEAD.
| |
| setUseV6AEAD | back to summary |
|---|---|
| public PGPDataEncryptorBuilder setUseV6AEAD() Specify we are using V6 AEAD.
| |
| setWithAEAD | back to summary |
|---|---|
| public PGPDataEncryptorBuilder setWithAEAD(int aeadAlgorithm, int chunkSize) Sets whether the resulting encrypted data will be protected using an AEAD mode. The chunkSize is used as a power of two, result in blocks (1 << chunkSize) containing data with an extra 16 bytes for the tag. The minimum chunkSize is 6.
| |
| setWithIntegrityPacket | back to summary |
|---|---|
| public PGPDataEncryptorBuilder setWithIntegrityPacket(boolean withIntegrityPacket) Sets whether or not the resulting encrypted data will be protected using an integrity packet.
| |