MCPcopy Create free account
hub / github.com/SocketCluster/socketcluster / f

Function f

app/public/socketcluster-client.js:8180–8194  ·  view source on GitHub ↗
(s, x, y, z)

Source from the content-addressed store, hash-verified

8178// Adapted from Chris Veness' SHA1 code at
8179// http://www.movable-type.co.uk/scripts/sha1.html
8180function f(s, x, y, z) {
8181 switch (s) {
8182 case 0:
8183 return x & y ^ ~x & z;
8184
8185 case 1:
8186 return x ^ y ^ z;
8187
8188 case 2:
8189 return x & y ^ x & z ^ y & z;
8190
8191 case 3:
8192 return x ^ y ^ z;
8193 }
8194}
8195
8196function ROTL(x, n) {
8197 return x << n | x >>> 32 - n;

Callers 2

sha1Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected