public class MessageEncryptionMechanism
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static MessageEncryptionMechanism |
aead(int symmetricKeyAlgorithm,
int aeadAlgorithm)
The data will be AEAD-encrypted using the method described in RFC9580.
|
static MessageEncryptionMechanism |
aead(PreferredAEADCiphersuites.Combination combination) |
boolean |
equals(java.lang.Object obj) |
int |
getAeadAlgorithm() |
EncryptedDataPacketType |
getMode() |
int |
getSymmetricKeyAlgorithm() |
int |
hashCode() |
static MessageEncryptionMechanism |
integrityProtected(int symmetricKeyAlgorithm)
The data will be encrypted and integrity protected using a SEIPDv1 packet.
|
boolean |
isEncrypted()
Return true, if the message will be encrypted.
|
static MessageEncryptionMechanism |
librePgp(int symmetricKeyAlgorithm)
The data will be OCB-encrypted as specified by the non-standard LibrePGP document.
|
static MessageEncryptionMechanism |
unencrypted()
The data will not be encrypted.
|
public EncryptedDataPacketType getMode()
public int getSymmetricKeyAlgorithm()
public int getAeadAlgorithm()
public static MessageEncryptionMechanism unencrypted()
public static MessageEncryptionMechanism integrityProtected(int symmetricKeyAlgorithm)
symmetricKeyAlgorithm
- symmetric cipher algorithm for message encryptionpublic static MessageEncryptionMechanism librePgp(int symmetricKeyAlgorithm)
symmetricKeyAlgorithm
- symmetric key algorithm which will be combined with OCB to form
an OCB-encrypted data packetpublic static MessageEncryptionMechanism aead(int symmetricKeyAlgorithm, int aeadAlgorithm)
symmetricKeyAlgorithm
- symmetric cipher algorithmaeadAlgorithm
- AEAD algorithmpublic static MessageEncryptionMechanism aead(PreferredAEADCiphersuites.Combination combination)
public boolean isEncrypted()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object