SymmetricKeyAlgorithmTags
PGPPBEEncryptedData
, PGPPublicKeyEncryptedData
public abstract class PGPEncryptedData extends java.lang.Object implements SymmetricKeyAlgorithmTags
Encrypted data packets are decrypted using a PGPDataDecryptor
obtained from a
PGPDataDecryptorFactory
.
Modifier and Type | Class | Description |
---|---|---|
protected class |
PGPEncryptedData.TruncatedStream |
AES_128, AES_192, AES_256, BLOWFISH, CAMELLIA_128, CAMELLIA_192, CAMELLIA_256, CAST5, DES, IDEA, NULL, SAFER, TRIPLE_DES, TWOFISH
Modifier and Type | Method | Description |
---|---|---|
java.io.InputStream |
getInputStream() |
Return the raw input stream for the data stream.
|
boolean |
isIntegrityProtected() |
Checks whether the packet is integrity protected.
|
boolean |
verify() |
Verifies the integrity of the packet against the modification detection code associated with
it in the stream.
|
public java.io.InputStream getInputStream()
Note this stream is shared with all other encryption methods in the same
PGPEncryptedDataList
and with any decryption methods in sub-classes, so consuming
this stream will affect decryption.
public boolean isIntegrityProtected()
true
if there is a modification detection code package associated with
this streampublic boolean verify() throws PGPException, java.io.IOException
Note: This can only be called after the message has been read.
true
if the message verifies, false
otherwise.PGPException
- if the message is not integrity
protected
.java.io.IOException