MCPcopy Index your code
hub / github.com/nodejs/node / byteArrayToUnpaddedBase64

Function byteArrayToUnpaddedBase64

test/fixtures/wpt/WebCryptoAPI/util/helpers.js:385–393  ·  view source on GitHub ↗
(byteArray)

Source from the content-addressed store, hash-verified

383
384// Jwk format wants Base 64 without the typical padding at the end.
385function byteArrayToUnpaddedBase64(byteArray){
386 var binaryString = "";
387 for (var i=0; i<byteArray.byteLength; i++){
388 binaryString += String.fromCharCode(byteArray[i]);
389 }
390 var base64String = btoa(binaryString);
391
392 return base64String.replace(/=/g, "");
393}

Callers 4

jwkDataFunction · 0.85
jwkDataFunction · 0.85
jwkDataFunction · 0.85
jwkDataFunction · 0.85

Calls 1

btoaFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…