@aws-amplify/auth
Version:
Auth category of aws-amplify
1 lines • 920 B
Source Map (JSON)
{"version":3,"file":"getHexFromBytes.mjs","sources":["../../../../../../src/providers/cognito/utils/srp/getHexFromBytes.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { SHORT_TO_HEX } from './constants';\n/**\n * Converts a Uint8Array of binary data to a hexadecimal encoded string.\n *\n * @param bytes The binary data to encode\n */\nexport const getHexFromBytes = (bytes) => {\n let out = '';\n for (let i = 0; i < bytes.byteLength; i++) {\n out += SHORT_TO_HEX[bytes[i]];\n }\n return out;\n};\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACY,MAAC,eAAe,GAAG,CAAC,KAAK,KAAK;AAC1C,IAAI,IAAI,GAAG,GAAG,EAAE;AAChB,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE;AAC/C,QAAQ,GAAG,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACrC;AACA,IAAI,OAAO,GAAG;AACd;;;;"}