diff --git a/modules/cache-material/src/build_cryptographic_materials_cache_key_helpers.ts b/modules/cache-material/src/build_cryptographic_materials_cache_key_helpers.ts index fc411f64..380324c9 100644 --- a/modules/cache-material/src/build_cryptographic_materials_cache_key_helpers.ts +++ b/modules/cache-material/src/build_cryptographic_materials_cache_key_helpers.ts @@ -15,9 +15,6 @@ import { } from '@aws-crypto/serialize' import { compare } from './portable_compare' -// 512 bits of 0 for padding between hashes in decryption materials cache ID generation. -const BIT_PAD_512 = Buffer.alloc(64) - export function buildCryptographicMaterialsCacheKeyHelpers< S extends SupportedAlgorithmSuites >( @@ -25,6 +22,8 @@ export function buildCryptographicMaterialsCacheKeyHelpers< toUtf8: (input: Uint8Array) => string, sha512: (...data: (Uint8Array | string)[]) => Promise ): CryptographicMaterialsCacheKeyHelpersInterface { + // 512 bits of 0 for padding between hashes in decryption materials cache ID generation. + const BIT_PAD_512 = Buffer.alloc(64) const sorting: SerializeOptions = { utf8Sorting: true } const { serializeEncryptionContext, serializeEncryptedDataKey } = serializeFactory(fromUtf8, sorting) diff --git a/package-lock.json b/package-lock.json index 6a4bf439..16310b41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -415,6 +415,7 @@ "@types/stream-to-promise": "^2.2.0", "@types/yargs": "^17.0.1", "buffer": "^6.0.3", + "end-of-stream": "<=1.4.4", "got": "^11.8.0", "jasmine-core": "^3.5.0", "karma": "^6.3.4",