Skip to content

Commit 9d3283e

Browse files
committed
no .context
1 parent 3468cb5 commit 9d3283e

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

modules/cache-material/test/build_cryptographic_materials_cache_key_helpers.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const {
3838
describe('buildCryptographicMaterialsCacheKeyHelpers::encryptionContextHash', () => {
3939
for (const vector of encryptionContextVectors) {
4040
it(`${vector.name}`, async () => {
41-
const test = await encryptionContextHash(vector.context)
41+
const test = await encryptionContextHash(vector.encryptionContext)
4242
expect(test).to.deep.equal(vector.hash)
4343
})
4444
}

modules/cache-material/test/fixtures.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ import { EncryptedDataKey, AlgorithmSuiteIdentifier } from '@aws-crypto/material
2020
const partitionName = 'c15b9079-6d0e-42b6-8784-5e804b025692'
2121
const encryptionContextEmpty = {
2222
name: 'encryptionContextEmpty',
23-
context: {},
23+
encryptionContext: {},
2424
hash: new Uint8Array([ 207, 131, 225, 53, 126, 239, 184, 189, 241, 84, 40, 80, 214, 109, 128, 7, 214, 32, 228, 5, 11, 87, 21, 220, 131, 244, 169, 33, 211, 108, 233, 206, 71, 208, 209, 60, 93, 133, 242, 176, 255, 131, 24, 210, 135, 126, 236, 47, 99, 185, 49, 189, 71, 65, 122, 129, 165, 56, 50, 122, 249, 39, 218, 62 ])
2525
}
2626

2727
const encryptionContextFull = {
2828
name: 'encryptionContextFull',
29-
context: { 'this': 'is', 'a': 'non-empty', 'encryption': 'context' },
29+
encryptionContext: { 'this': 'is', 'a': 'non-empty', 'encryption': 'context' },
3030
hash: new Uint8Array([ 4, 250, 62, 217, 137, 103, 44, 245, 231, 15, 24, 164, 62, 35, 99, 8, 4, 29, 75, 147, 51, 243, 111, 68, 2, 126, 189, 113, 20, 150, 243, 92, 188, 56, 128, 79, 167, 9, 114, 93, 83, 189, 146, 168, 7, 189, 229, 174, 231, 68, 184, 217, 66, 18, 60, 223, 54, 127, 13, 7, 230, 79, 129, 73 ])
3131
}
3232

@@ -60,7 +60,7 @@ export const encryptCacheKeyVectors: VectorHack[] = [
6060
partitionName,
6161
{
6262
suite: undefined,
63-
encryptionContext: encryptionContextEmpty.context
63+
encryptionContext: encryptionContextEmpty.encryptionContext
6464
}
6565
],
6666
id: 'rkrFAso1YyPbOJbmwVMjrPw+wwLJT7xusn8tA8zMe9e3+OqbtfDueB7bvoKLU3fsmdUvZ6eMt7mBp1ThMMB25Q=='
@@ -70,7 +70,7 @@ export const encryptCacheKeyVectors: VectorHack[] = [
7070
partitionName,
7171
{
7272
suite: { id: AlgorithmSuiteIdentifier.ALG_AES256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384 },
73-
encryptionContext: encryptionContextEmpty.context
73+
encryptionContext: encryptionContextEmpty.encryptionContext
7474
}
7575
],
7676
id: '3icBIkLK4V3fVwbm3zSxUdUQV6ZvZYUOLl8buN36g6gDMqAkghcGryxX7QiVABkW1JhB6GRp5z+bzbiuciBcKQ=='
@@ -80,7 +80,7 @@ export const encryptCacheKeyVectors: VectorHack[] = [
8080
partitionName,
8181
{
8282
suite: undefined,
83-
encryptionContext: encryptionContextFull.context
83+
encryptionContext: encryptionContextFull.encryptionContext
8484
}
8585
],
8686
id: 'IHiUHYOUVUEFTc3BcZPJDlsWct2Qy1A7JdfQl9sQoV/ILIbRpoz9q7RtGd/MlibaGl5ihE66cN8ygM8A5rtYbg=='
@@ -90,7 +90,7 @@ export const encryptCacheKeyVectors: VectorHack[] = [
9090
partitionName,
9191
{
9292
suite: { id: AlgorithmSuiteIdentifier.ALG_AES256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384 },
93-
encryptionContext: encryptionContextFull.context
93+
encryptionContext: encryptionContextFull.encryptionContext
9494
}
9595
],
9696
id: 'mRNK7qhTb/kJiiyGPgAevp0gwFRcET4KeeNYwZHhoEDvSUzQiDgl8Of+YRDaVzKxAqpNBgcAuFXde9JlaRRsmw=='
@@ -104,7 +104,7 @@ export const decryptCacheKeyVectors: VectorHack[] = [
104104
{
105105
suite: { id: AlgorithmSuiteIdentifier.ALG_AES128_GCM_IV12_TAG16_HKDF_SHA256 },
106106
encryptedDataKeys: [encryptedDataKey1.edk],
107-
encryptionContext: encryptionContextEmpty.context
107+
encryptionContext: encryptionContextEmpty.encryptionContext
108108
}
109109
],
110110
id: 'n0zVzk9QIVxhz6ET+aJIKKOJNxtpGtSe1yAbu7WU5l272Iw/jmhlER4psDHJs9Mr8KYiIvLGSXzggNDCc23+9w=='
@@ -115,7 +115,7 @@ export const decryptCacheKeyVectors: VectorHack[] = [
115115
{
116116
suite: { id: AlgorithmSuiteIdentifier.ALG_AES256_GCM_IV12_TAG16_HKDF_SHA384_ECDSA_P384 },
117117
encryptedDataKeys: [encryptedDataKey1.edk, encryptedDataKey2.edk],
118-
encryptionContext: encryptionContextFull.context
118+
encryptionContext: encryptionContextFull.encryptionContext
119119
}
120120
],
121121
id: '+rtwUe38CGnczGmYu12iqGWHIyDyZ44EvYQ4S6ACmsgS8VaEpiw0RTGpDk6Z/7YYN/jVHOAcNKDyCNP8EmstFg=='

0 commit comments

Comments
 (0)