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

Function str2binb

example/bundle.js:552–557  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

550 * In 8-bit function, characters >255 have their hi-byte silently ignored.
551 */
552 function str2binb(str) {
553 var bin = Array();
554 var mask = (1 << chrsz) - 1;
555 for (var i = 0; i < str.length * chrsz; i += chrsz) { bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (32 - chrsz - i % 32); }
556 return bin;
557 }
558
559 /*
560 * Convert an array of big-endian words to a string

Callers 4

hex_sha1Function · 0.85
b64_sha1Function · 0.85
str_sha1Function · 0.85
core_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…