GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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
Filter options
  • README.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎README.md‎

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 numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ public class StringExample {
122122

123123
// The AWS Encryption SDK may add information to the encryption context, so check to
124124
// 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()
126126
.allMatch( e -> e.getValue().equals(decryptResult.getEncryptionContext().get(e.getKey())))) {
127127
throw new IllegalStateException("Wrong Encryption Context!");
128128
}
129129

130-
assert Arrays.equals(decryptResult.getResult(), data.getBytes(StandardCharsets.UTF_8));
130+
assert Arrays.equals(decryptResult.getResult(), plaintext.getBytes(StandardCharsets.UTF_8));
131131

132132
// The data is correct, so return it.
133133
System.out.println("Decrypted: " + new String(decryptResult.getResult(), StandardCharsets.UTF_8));

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.