Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ public static byte[] serialize(Map<String, String> encryptionContext) {
for (Entry<String, String> mapEntry : encryptionContext.entrySet()) {
if (mapEntry.getKey() == null || mapEntry.getValue() == null) {
throw new AwsCryptoException(
"All keys and values in excryption context must be non-null.");
"All keys and values in encryption context must be non-null.");
}

if (mapEntry.getKey().isEmpty() || mapEntry.getValue().isEmpty()) {
throw new AwsCryptoException(
"All keys and values in excryption context must be non-empty.");
"All keys and values in encryption context must be non-empty.");
}

final ByteBuffer keyBytes = encoder.encode(CharBuffer.wrap(mapEntry.getKey()));
Expand All @@ -100,7 +100,7 @@ public static byte[] serialize(Map<String, String> encryptionContext) {

if (keyBytes.limit() > Short.MAX_VALUE || valueBytes.limit() > Short.MAX_VALUE) {
throw new AwsCryptoException(
"All keys and values in excryption context must be shorter than " + Short.MAX_VALUE);
"All keys and values in encryption context must be shorter than " + Short.MAX_VALUE);
}
}

Expand Down