1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-12-16 17:21:08 +01:00

fix formating issues in Testcase.

This commit is contained in:
feri 2022-02-23 22:30:17 +01:00
parent 151b765302
commit aa14d1fe3b

View file

@ -132,10 +132,11 @@ public class Encrypt {
/**
* In this example, Alice is sending a signed and encrypted message to Bob.
* She signs the message using her key and then encrypts the message to both bobs certificate and her own.
* She encrypts the message to both bobs certificate and her own.
* A comment header with the text "This comment was added using options." is added
* using the fluent ProducerOption syntax.
*
* Bob subsequently decrypts the message using his key and verifies that the message was signed by Alice using
* her certificate.
* Bob subsequently decrypts the message using his key.
*/
@Test
public void encryptWithCommentHeader() throws PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException, IOException {
@ -170,7 +171,7 @@ public class Encrypt {
encryptor.close();
String encryptedMessage = ciphertext.toString();
// comment should be third line after "BEGIN PGP" and "Version:"
// check that comment header was added after "BEGIN PGP" and "Version:"
assertEquals(encryptedMessage.split("\n")[2].trim(), "Comment: " + comment);
// also test, that decryption still works...