Skip to content

Initial commit #609

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
2 changes: 1 addition & 1 deletion modules/cache-material/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@aws-crypto/serialize": "file:../serialize",
"@types/lru-cache": "^5.1.0",
"lru-cache": "^6.0.0",
"tslib": "^1.11.1"
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
4 changes: 2 additions & 2 deletions modules/caching-materials-manager-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"@aws-crypto/serialize": "file:../serialize",
"@aws-crypto/web-crypto-backend": "file:../web-crypto-backend",
"@aws-sdk/util-base64-browser": "3.1.0",
"@aws-sdk/util-utf8-browser": "3.1.0",
"tslib": "^1.11.1"
"@aws-sdk/util-utf8-browser": "3.13.1",
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
2 changes: 1 addition & 1 deletion modules/caching-materials-manager-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"dependencies": {
"@aws-crypto/cache-material": "file:../cache-material",
"@aws-crypto/material-management-node": "file:../material-management-node",
"tslib": "^1.11.1"
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
2 changes: 1 addition & 1 deletion modules/client-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@aws-crypto/raw-aes-keyring-browser": "file:../raw-aes-keyring-browser",
"@aws-crypto/raw-rsa-keyring-browser": "file:../raw-rsa-keyring-browser",
"@aws-crypto/web-crypto-backend": "file:../web-crypto-backend",
"tslib": "^1.11.1"
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
2 changes: 1 addition & 1 deletion modules/client-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@aws-crypto/material-management-node": "file:../material-management-node",
"@aws-crypto/raw-aes-keyring-node": "file:../raw-aes-keyring-node",
"@aws-crypto/raw-rsa-keyring-node": "file:../raw-rsa-keyring-node",
"tslib": "^1.11.1"
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
4 changes: 2 additions & 2 deletions modules/decrypt-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"dependencies": {
"@aws-crypto/material-management-browser": "file:../material-management-browser",
"@aws-crypto/serialize": "file:../serialize",
"@aws-sdk/util-utf8-browser": "3.1.0",
"tslib": "^1.11.1"
"@aws-sdk/util-utf8-browser": "3.13.1",
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
2 changes: 1 addition & 1 deletion modules/decrypt-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@types/duplexify": "^3.6.0",
"duplexify": "^4.1.1",
"readable-stream": "^3.6.0",
"tslib": "^1.11.1"
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
4 changes: 2 additions & 2 deletions modules/encrypt-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"@aws-crypto/material-management-browser": "file:../material-management-browser",
"@aws-crypto/serialize": "file:../serialize",
"@aws-crypto/web-crypto-backend": "file:../web-crypto-backend",
"@aws-sdk/util-utf8-browser": "3.1.0",
"tslib": "^1.11.1"
"@aws-sdk/util-utf8-browser": "3.13.1",
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
2 changes: 1 addition & 1 deletion modules/encrypt-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@types/duplexify": "^3.6.0",
"duplexify": "^4.1.1",
"readable-stream": "^3.6.0",
"tslib": "^1.11.1"
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
8 changes: 4 additions & 4 deletions modules/example-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@
"@aws-sdk/util-base64-browser": "3.1.0",
"@types/chai": "^4.2.11",
"chai": "^4.2.0",
"karma": "5.2.3",
"karma": "6.3.2",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-mocha": "2.0.1",
"karma-webpack": "^4.0.2",
"ts-loader": "8.0.13",
"ts-node": "^8.8.1",
"tslib": "^1.11.1",
"ts-node": "^9.1.1",
"tslib": "^2.2.0",
"typescript": "^4.0.2",
"webpack": "^4.42.1",
"webpack-cli": "4.3.1"
"webpack-cli": "4.6.0"
},
"main": "./build/main/index.js",
"module": "./build/module/index.js",
Expand Down
2 changes: 1 addition & 1 deletion modules/example-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"license": "Apache-2.0",
"dependencies": {
"@aws-crypto/client-node": "file:../client-node",
"tslib": "^1.11.1"
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
2 changes: 1 addition & 1 deletion modules/hkdf-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"tslib": "^1.11.1"
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
6 changes: 3 additions & 3 deletions modules/integration-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@
"@aws-crypto/client-browser": "file:../client-browser",
"@aws-sdk/karma-credential-loader": "3.1.0",
"@aws-sdk/util-base64-browser": "3.1.0",
"@aws-sdk/util-utf8-browser": "3.1.0",
"@aws-sdk/util-utf8-browser": "3.13.1",
"@trust/keyto": "^1.0.1",
"@types/got": "^9.6.9",
"@types/stream-to-promise": "^2.2.0",
"@types/yargs": "^15.0.3",
"@types/yauzl": "^2.9.1",
"got": "^11.8.0",
"jasmine-core": "^3.5.0",
"karma": "5.2.3",
"karma": "6.3.2",
"karma-chrome-launcher": "^3.1.0",
"karma-jasmine": "^4.0.1",
"karma-json-fixtures-preprocessor": "0.0.6",
"karma-parallel": "^0.3.1",
"karma-webpack": "^4.0.2",
"stream-to-promise": "^3.0.0",
"tslib": "^1.11.1",
"tslib": "^2.2.0",
"webpack": "^4.42.1",
"yargs": "^15.3.1",
"yauzl": "^2.10.0"
Expand Down
2 changes: 1 addition & 1 deletion modules/integration-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@types/yauzl": "^2.9.1",
"got": "^11.8.0",
"stream-to-promise": "^3.0.0",
"tslib": "^1.11.1",
"tslib": "^2.2.0",
"yargs": "^15.3.1",
"yauzl": "^2.10.0"
},
Expand Down
2 changes: 1 addition & 1 deletion modules/kms-keyring-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@aws-crypto/material-management-browser": "file:../material-management-browser",
"@aws-crypto/web-crypto-backend": "file:../web-crypto-backend",
"aws-sdk": "^2.650.0",
"tslib": "^1.11.1"
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
2 changes: 1 addition & 1 deletion modules/kms-keyring-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@aws-crypto/kms-keyring": "file:../kms-keyring",
"@aws-crypto/material-management-node": "file:../material-management-node",
"aws-sdk": "^2.650.0",
"tslib": "^1.11.1"
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
2 changes: 1 addition & 1 deletion modules/kms-keyring/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"license": "Apache-2.0",
"dependencies": {
"@aws-crypto/material-management": "file:../material-management",
"tslib": "^1.11.1"
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
2 changes: 1 addition & 1 deletion modules/material-management-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@aws-crypto/serialize": "file:../serialize",
"@aws-crypto/web-crypto-backend": "file:../web-crypto-backend",
"@aws-sdk/util-base64-browser": "3.1.0",
"tslib": "^1.11.1"
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
2 changes: 1 addition & 1 deletion modules/material-management-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@aws-crypto/hkdf-node": "file:../hkdf-node",
"@aws-crypto/material-management": "file:../material-management",
"@aws-crypto/serialize": "file:../serialize",
"tslib": "^1.11.1"
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
2 changes: 1 addition & 1 deletion modules/material-management/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"dependencies": {
"asn1.js": "^5.3.0",
"bn.js": "^5.1.1",
"tslib": "^1.11.1"
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
4 changes: 2 additions & 2 deletions modules/raw-aes-keyring-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"@aws-crypto/raw-keyring": "file:../raw-keyring",
"@aws-crypto/serialize": "file:../serialize",
"@aws-crypto/web-crypto-backend": "file:../web-crypto-backend",
"@aws-sdk/util-utf8-browser": "3.1.0",
"tslib": "^1.11.1"
"@aws-sdk/util-utf8-browser": "3.13.1",
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
2 changes: 1 addition & 1 deletion modules/raw-aes-keyring-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@aws-crypto/material-management-node": "file:../material-management-node",
"@aws-crypto/raw-keyring": "file:../raw-keyring",
"@aws-crypto/serialize": "file:../serialize",
"tslib": "^1.11.1"
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
2 changes: 1 addition & 1 deletion modules/raw-keyring/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"dependencies": {
"@aws-crypto/material-management": "file:../material-management",
"@aws-crypto/serialize": "file:../serialize",
"tslib": "^1.11.1"
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
2 changes: 1 addition & 1 deletion modules/raw-rsa-keyring-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@aws-crypto/raw-keyring": "file:../raw-keyring",
"@aws-crypto/web-crypto-backend": "file:../web-crypto-backend",
"@aws-sdk/util-base64-browser": "3.1.0",
"tslib": "^1.11.1"
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
2 changes: 1 addition & 1 deletion modules/raw-rsa-keyring-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"dependencies": {
"@aws-crypto/material-management-node": "file:../material-management-node",
"@aws-crypto/raw-keyring": "file:../raw-keyring",
"tslib": "^1.11.1"
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
2 changes: 1 addition & 1 deletion modules/serialize/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@aws-crypto/material-management": "file:../material-management",
"asn1.js": "^5.3.0",
"bn.js": "^5.1.1",
"tslib": "^1.11.1"
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
6 changes: 4 additions & 2 deletions modules/serialize/src/decode_encryption_context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ export function decodeEncryptionContextFactory(
* Exported for testing. Used by deserializeMessageHeader to compose a complete solution.
* @param encodedEncryptionContext Uint8Array
*/
function decodeEncryptionContext(encodedEncryptionContext: Uint8Array) {
function decodeEncryptionContext(
encodedEncryptionContext: Uint8Array
): Readonly<EncryptionContext> {
const encryptionContext: EncryptionContext = Object.create(null)
/* Check for early return (Postcondition): The case of 0 length is defined as an empty object. */
if (!encodedEncryptionContext.byteLength) {
return encryptionContext
return Object.freeze(encryptionContext)
}
/* Uint8Array is a view on top of the underlying ArrayBuffer.
* This means that raw underlying memory stored in the ArrayBuffer
Expand Down
4 changes: 2 additions & 2 deletions modules/web-crypto-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"dependencies": {
"@aws-crypto/ie11-detection": "1.0.0",
"@aws-crypto/supports-web-crypto": "1.0.0",
"@aws-sdk/util-locate-window": "3.1.0",
"tslib": "^1.11.1"
"@aws-sdk/util-locate-window": "3.13.1",
"tslib": "^2.2.0"
},
"sideEffects": false,
"main": "./build/main/index.js",
Expand Down
Loading