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 |
legacyEncryptedNonIntegrityProtected(int symmetricKeyAlgorithm)
Deprecated.
|
static MessageEncryptionMechanism |
librePgp(int symmetricKeyAlgorithm)
The data will be OCB-encrypted as specified by the non-standard LibrePGP document.
|
java.lang.String |
toString() |
static MessageEncryptionMechanism |
unencrypted()
The data will not be encrypted.
|
public EncryptedDataPacketType getMode()
public int getSymmetricKeyAlgorithm()
public int getAeadAlgorithm()
public static MessageEncryptionMechanism unencrypted()
@Deprecated public static MessageEncryptionMechanism legacyEncryptedNonIntegrityProtected(int symmetricKeyAlgorithm)
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.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object