MCPcopy
hub / github.com/dcodeIO/bcrypt.js / _streamtoword

Function _streamtoword

index.js:863–868  ·  view source on GitHub ↗

* @param {Array. } data * @param {number} offp * @returns {{key: number, offp: number}} * @inner

(data, offp)

Source from the content-addressed store, hash-verified

861 * @inner
862 */
863function _streamtoword(data, offp) {
864 for (var i = 0, word = 0; i < 4; ++i)
865 (word = (word << 8) | (data[offp] & 0xff)),
866 (offp = (offp + 1) % data.length);
867 return { key: word, offp: offp };
868}
869
870/**
871 * @param {Array.<number>} key

Callers 2

_keyFunction · 0.85
_ekskeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected