MCPcopy Index your code
hub / github.com/dcodeIO/bcrypt.js / finish

Function finish

index.js:1093–1104  ·  view source on GitHub ↗

* Finishes hashing. * @param {Array. } bytes Byte array * @returns {string} * @inner

(bytes)

Source from the content-addressed store, hash-verified

1091 * @inner
1092 */
1093 function finish(bytes) {
1094 var res = [];
1095 res.push("$2");
1096 if (minor >= "a") res.push(minor);
1097 res.push("$");
1098 if (rounds < 10) res.push("0");
1099 res.push(rounds.toString());
1100 res.push("$");
1101 res.push(base64_encode(saltb, saltb.length));
1102 res.push(base64_encode(bytes, C_ORIG.length * 4 - 1));
1103 return res.join("");
1104 }
1105
1106 // Sync
1107 if (typeof callback == "undefined")

Callers 1

_hashFunction · 0.85

Calls 1

base64_encodeFunction · 0.85

Tested by

no test coverage detected