GeezerVison is showing github.com — fix: Fix errors in the example code in README.md (#1306) · aws/aws-encryption-sdk-java@b3f5b00
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: README.md +2-2Lines changed: 2 additions & 2 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -122,12 +122,12 @@ public class StringExample { |
122 | 122 |
|
123 | 123 | // The AWS Encryption SDK may add information to the encryption context, so check to |
124 | 124 | // ensure all of the values that you specified when encrypting are *included* in the returned encryption context. |
125 | | - if (!context.entrySet().stream |
| 125 | + if (!context.entrySet().stream() |
126 | 126 | .allMatch( e -> e.getValue().equals(decryptResult.getEncryptionContext().get(e.getKey())))) { |
127 | 127 | throw new IllegalStateException("Wrong Encryption Context!"); |
128 | 128 | } |
129 | 129 |
|
130 | | - assert Arrays.equals(decryptResult.getResult(), data.getBytes(StandardCharsets.UTF_8)); |
| 130 | + assert Arrays.equals(decryptResult.getResult(), plaintext.getBytes(StandardCharsets.UTF_8)); |
131 | 131 |
|
132 | 132 | // The data is correct, so return it. |
133 | 133 | System.out.println("Decrypted: " + new String(decryptResult.getResult(), StandardCharsets.UTF_8)); |
|