MCPcopy Create free account
hub / github.com/lesspass/lesspass / arrayBufferToHex

Function arrayBufferToHex

packages/lesspass-entropy/src/stringEncoding.js:11–18  ·  view source on GitHub ↗
(arrayBuffer)

Source from the content-addressed store, hash-verified

9}
10
11function arrayBufferToHex(arrayBuffer) {
12 const byteArray = new Uint8Array(arrayBuffer);
13 let str = "";
14 for (let i = 0; i < byteArray.byteLength; i += 1) {
15 str += byteArray[i].toString(16).padStart(2, "0");
16 }
17 return str;
18}
19
20module.exports = {
21 stringToArrayBuffer,

Callers 2

pbkdf2.browser.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected