mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-09 10:19:39 +02:00
EncryptionMechanismNegotiator: Allow producing AEADED/OED packets
This commit is contained in:
parent
b10b65d7cc
commit
8290c7a3de
1 changed files with 9 additions and 0 deletions
|
@ -67,6 +67,15 @@ fun interface EncryptionMechanismNegotiator {
|
|||
return MessageEncryptionMechanism.aead(
|
||||
bestSupportedMode.ciphermode.algorithmId,
|
||||
bestSupportedMode.aeadAlgorithm.algorithmId)
|
||||
} else if (features.all { it.contains(Feature.LIBREPGP_OCB_ENCRYPTED_DATA) }) {
|
||||
return MessageEncryptionMechanism.librePgp(
|
||||
symmetricKeyAlgorithmNegotiator
|
||||
.negotiate(
|
||||
policy.messageEncryptionAlgorithmPolicy
|
||||
.symmetricAlgorithmPolicy,
|
||||
null,
|
||||
symmetricAlgorithmPreferences)
|
||||
.algorithmId)
|
||||
}
|
||||
// If all support SEIPD1, negotiate SEIPD1 using symmetricKeyAlgorithmNegotiator
|
||||
else if (features.all { it.contains(Feature.MODIFICATION_DETECTION) }) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue