bot / node_modules /@aws-crypto /util /src /numToUint8.ts
sweet2004's picture
Upload 5577 files
80ce16c verified
Raw History Blame Contribute Delete
296 Bytes
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
export function numToUint8(num: number) {
return new Uint8Array([
(num & 0xff000000) >> 24,
(num & 0x00ff0000) >> 16,
(num & 0x0000ff00) >> 8,
num & 0x000000ff,
]);
}