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:
parent
151b765302
commit
aa14d1fe3b
1 changed files with 10 additions and 9 deletions
|
|
@ -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...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue