Skip to content

Commit 26c6e47

Browse files
author
Shubham Chaturvedi
committed
fix: remove usage of Buffer from top-level
1 parent d8b7631 commit 26c6e47

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

modules/cache-material/src/build_cryptographic_materials_cache_key_helpers.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,15 @@ import {
1515
} from '@aws-crypto/serialize'
1616
import { compare } from './portable_compare'
1717

18-
// 512 bits of 0 for padding between hashes in decryption materials cache ID generation.
19-
const BIT_PAD_512 = Buffer.alloc(64)
20-
2118
export function buildCryptographicMaterialsCacheKeyHelpers<
2219
S extends SupportedAlgorithmSuites
2320
>(
2421
fromUtf8: (input: string) => Uint8Array,
2522
toUtf8: (input: Uint8Array) => string,
2623
sha512: (...data: (Uint8Array | string)[]) => Promise<Uint8Array>
2724
): CryptographicMaterialsCacheKeyHelpersInterface<S> {
25+
// 512 bits of 0 for padding between hashes in decryption materials cache ID generation.
26+
const BIT_PAD_512 = Buffer.alloc(64)
2827
const sorting: SerializeOptions = { utf8Sorting: true }
2928
const { serializeEncryptionContext, serializeEncryptedDataKey } =
3029
serializeFactory(fromUtf8, sorting)

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)