(s, x, y, z)
| 8178 | // Adapted from Chris Veness' SHA1 code at |
| 8179 | // http://www.movable-type.co.uk/scripts/sha1.html |
| 8180 | function 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 | |
| 8196 | function ROTL(x, n) { |
| 8197 | return x << n | x >>> 32 - n; |
no outgoing calls
no test coverage detected