Skip to content

Commit bfb1bac

Browse files
seebeesragona
authored andcommitted
doc: document breaking changes (aws#223)
* doc: document breaking changes Document the breaking changes in moving from `preview` to `1.0.0`. * document breaking changes
1 parent c4255fa commit bfb1bac

File tree

7 files changed

+50
-3
lines changed

7 files changed

+50
-3
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,17 @@ npm test
8080
This SDK is distributed under the
8181
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0),
8282
see LICENSE.txt and NOTICE.txt for more information.
83+
84+
# Breaking changes from `preview` to `1.0.0`
85+
86+
The AWS Encryption SDK for JavaScript is generally available
87+
as of October 1, 2019.
88+
There were breaking changes during the `preview`.
89+
90+
* Passing encryption context to `encrypt` is now `{ encryptionContext?: EncryptionContext }` [#148][encryptionContext]
91+
* The return value of `encrypt` is now `{result: Uint8Array, messageHeader: MessageHeader}` [#211][encryptResult]
92+
* `encrypt` strictly enforces `plaintextLength` [#213][plaintextLength]
93+
94+
[encryptionContext]: https://github.com/aws/aws-encryption-sdk-javascript/pull/148
95+
[encryptResult]: https://github.com/aws/aws-encryption-sdk-javascript/pull/211
96+
[plaintextLength]: https://github.com/aws/aws-encryption-sdk-javascript/pull/213

modules/decrypt-browser/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
2727
* encrypt/decrypt interface should be the same (#189) ff78f94, closes #189 #182
2828
* Encryption Context changes (#148) 5a7e9ca, closes #148 #54
2929

30+
### BREAKING CHANGES
3031

32+
* `decrypt` now returns `{plaintext: Uint8Array, messageHeader: MessageHeader}`
33+
instead of `{clearMessage: Uint8Array, messageHeader: MessageHeader}`.
3134

3235

3336

modules/encrypt-browser/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
1818

1919
* Encrypt name to result (#211) 03061d1, closes #211
2020

21+
### BREAKING CHANGES
2122

23+
* `encrypt` now returns `{result: Uint8Array, messageHeader: MessageHeader}`
24+
instead of `{ciphertext: Uint8Array, messageHeader: MessageHeader}`.
2225

2326

2427

@@ -32,6 +35,10 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
3235
* framLength is not passed to the CMM (#190) b60f653, closes #190 #161
3336

3437

38+
### BREAKING CHANGES
39+
40+
* `encrypt` now returns `{ciphertext: Uint8Array, messageHeader: MessageHeader}`
41+
instead of `{cipherMessage: Uint8Array, messageHeader: MessageHeader}`.
3542

3643

3744

modules/encrypt-node/CHANGELOG.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
1919
* Encrypt name to result (#211) 03061d1, closes #211
2020
* plaintextLength must be enforced (#213) 1788d25, closes #213
2121

22+
### BREAKING CHANGES
2223

23-
24+
* `encrypt` now returns `{result: Uint8Array, messageHeader: MessageHeader}`
25+
instead of `{ciphertext: Uint8Array, messageHeader: MessageHeader}`.
26+
* `encrypt` and `encryptStream` will now throw
27+
if the caller tries to encrypt more data than `plaintextLength`.
2428

2529

2630
# [0.1.0-preview.3](/compare/@aws-crypto/encrypt-node@0.1.0-preview.2...@aws-crypto/encrypt-node@0.1.0-preview.3) (2019-08-08)
@@ -31,9 +35,10 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
3135
* Encryption Context changes (#148) 5a7e9ca, closes #148 #54
3236
* framLength is not passed to the CMM (#190) b60f653, closes #190 #161
3337

38+
### BREAKING CHANGES
3439

35-
36-
40+
* `encrypt` and `encryptStream` now expect the encryption context
41+
to be passed as `encryptionContext` instead of `context`.
3742

3843
# [0.1.0-preview.2](/compare/@aws-crypto/encrypt-node@0.1.0-preview.1...@aws-crypto/encrypt-node@0.1.0-preview.2) (2019-07-24)
3944

modules/integration-browser/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
4747

4848
* Encryption tests for integration-browser (#159) 043506d, closes #159
4949

50+
### BREAKING CHANGES
5051

52+
* The cli now takes `encrypt` and `decrypt` as a command,
53+
instead of only supporting decrypt testing.
5154

5255

5356

modules/integration-node/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
3838

3939
* Encryption tests for integration-node (#153) d7b5e73, closes #153
4040

41+
### BREAKING CHANGES
42+
43+
* The cli now takes `encrypt` and `decrypt` as a command,
44+
instead of only supporting decrypt testing.
4145

4246

4347

modules/material-management/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
2626
* Remove unencryptedDataKeyLength (#201) bd160c0, closes #201
2727
* Suport Node.js crypto KeyObjects (#200) 77ad031, closes #200 #74
2828

29+
### BREAKING CHANGES
2930

31+
* CryptographicMaterial no longer support `unencryptedDataKeyLength`
3032

3133

3234

@@ -40,7 +42,16 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
4042
* framLength is not passed to the CMM (#190) b60f653, closes #190 #161
4143
* Multi keyrings should not require a generator (#165) 11ff819, closes #165
4244

45+
### BREAKING CHANGES
4346

47+
* CryptographicMaterial now require `encryptionContext` on creation.
48+
this includes `NodeDecryptionMaterial`, `NodeEncryptionMaterial`,
49+
`WebCryptoEncryptionMaterial`, and `WebCryptoDecryptionMaterial`.
50+
* The Keyring base class no longer accepts `encryptionContext`
51+
for `onDecrypt` and `onEncrypt`.
52+
It now gets this value from the CryptographicMaterial passed.
53+
* The CMM interface now returns CryptographicMaterial
54+
instead of a complex object with material and context.
4455

4556

4657

0 commit comments

Comments
 (0)