MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / safe_add

Function safe_add

scripts/passwordGenerator.js:87–91  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

85 }
86
87 function safe_add(x, y) {
88 var lsw = (x & 0xffff) + (y & 0xffff);
89 var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
90 return (msw << 16) | (lsw & 0xffff);
91 }
92
93 function rol(num, cnt) {
94 return (num << cnt) | (num >>> (32 - cnt));

Callers 1

core_sha1Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected