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

Function binb2hex

example/bundle.js:572–579  ·  view source on GitHub ↗
(binarray)

Source from the content-addressed store, hash-verified

570 * Convert an array of big-endian words to a hex string.
571 */
572 function binb2hex(binarray) {
573 var hex_tab = hexcase ? '0123456789ABCDEF' : '0123456789abcdef';
574 var str = '';
575 for (var i = 0; i < binarray.length * 4; i++) {
576 str += hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8 + 4)) & 0xF) + hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8)) & 0xF);
577 }
578 return str;
579 }
580
581 /*
582 * Convert an array of big-endian words to a base-64 string

Callers 2

hex_sha1Function · 0.85
hex_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…