Skip to content

Commit f763abd

Browse files
author
Lucas McDonald
committed
chore: Document encryption context interoperability for invalid UTF-8
1 parent 07b4bd8 commit f763abd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

include/aws/cryptosdk/materials.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,15 @@ struct aws_cryptosdk_enc_request {
136136
* The encryption context for this message. CMMs are permitted to modify this
137137
* hash table in order to inject additional keys or otherwise modify the encryption
138138
* context.
139+
*
140+
* The values provided to the encryption context SHOULD be UTF-8 encoded bytes.
141+
* You may provide invalid UTF-8 characters in the encryption context,
142+
* but this is discouraged.
143+
* Messages with invalid UTF-8 characters will not be interoperable
144+
* with other language implementations of the encryption SDK.
145+
* The encryption SDK for C will allow writing and reading messages with invalid UTF-8, but
146+
* the encryption SDK in other languages will neither read nor write
147+
* messages with invalid UTF-8.
139148
*/
140149
struct aws_hash_table *enc_ctx;
141150
/**

0 commit comments

Comments
 (0)