1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-12-07 12:51:07 +01:00

First draft for SEIPD2 negotiation

This commit is contained in:
Paul Schaub 2025-05-05 12:17:47 +02:00
parent de24da8698
commit 74067f644c
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
6 changed files with 124 additions and 49 deletions

View file

@ -376,6 +376,7 @@ public class EncryptDecryptTest {
eOut.write(testMessage.getBytes(StandardCharsets.UTF_8));
eOut.close();
ByteArrayInputStream bIn = new ByteArrayInputStream(bOut.toByteArray());
DecryptionStream dIn = PGPainless.decryptAndOrVerify()
.onInputStream(bIn)
@ -389,7 +390,7 @@ public class EncryptDecryptTest {
MessageMetadata metadata = dIn.getMetadata();
MessageEncryptionMechanism encryptionMechanism = metadata.getEncryptionMechanism();
assertEquals(
MessageEncryptionMechanism.aead(SymmetricKeyAlgorithm.AES_128.getAlgorithmId(), AEADAlgorithm.OCB.getAlgorithmId()),
MessageEncryptionMechanism.aead(SymmetricKeyAlgorithm.AES_192.getAlgorithmId(), AEADAlgorithm.OCB.getAlgorithmId()),
encryptionMechanism);
}
}