MCPcopy Create free account
hub / github.com/browserify/crypto-browserify / binb2str

Function binb2str

example/bundle.js:562–567  ·  view source on GitHub ↗
(bin)

Source from the content-addressed store, hash-verified

560 * Convert an array of big-endian words to a string
561 */
562 function binb2str(bin) {
563 var str = '';
564 var mask = (1 << chrsz) - 1;
565 for (var i = 0; i < bin.length * 32; i += chrsz) { str += String.fromCharCode((bin[i >> 5] >>> (32 - chrsz - i % 32)) & mask); }
566 return str;
567 }
568
569 /*
570 * Convert an array of big-endian words to a hex string.

Callers 2

str_sha1Function · 0.85
str_hmac_sha1Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…