How to use s4 method in root

Best JavaScript code snippet using root

sha1.js

Source:sha1.js Github

copy

Full Screen

1(function () {2 /*global CryptoJS:true */34 'use strict';56 // Shortcuts7 var C = CryptoJS;8 var C_LIB = C.lib;9 var WordArray = C_LIB.WordArray;10 var Hasher = C_LIB.Hasher;1112 // Constants13 var ROUND_CONSTANT_0 = 0x5a827999;14 var ROUND_CONSTANT_1 = 0x6ed9eba1;15 var ROUND_CONSTANT_2 = 0x8f1bbcdc;16 var ROUND_CONSTANT_3 = 0xca62c1d6;1718 /**19 * SHA-1 hash algorithm.20 */21 var SHA1 = C.SHA1 = Hasher.extend({22 _doInit: function () {23 },2425 _doReset: function () {26 this._state = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];27 },2829 _doProcessBlock: function (m) {30 // Shortcuts31 var s = this._state;32 var s0 = s[0];33 var s1 = s[1];34 var s2 = s[2];35 var s3 = s[3];36 var s4 = s[4];37 var _s0 = s0;38 var _s1 = s1;39 var _s2 = s2;40 var _s3 = s3;41 var _s4 = s4;4243 // Expand message44 var m0 = m[0] | 0;45 var m1 = m[1] | 0;46 var m2 = m[2] | 0;47 var m3 = m[3] | 0;48 var m4 = m[4] | 0;49 var m5 = m[5] | 0;50 var m6 = m[6] | 0;51 var m7 = m[7] | 0;52 var m8 = m[8] | 0;53 var m9 = m[9] | 0;54 var m10 = m[10] | 0;55 var m11 = m[11] | 0;56 var m12 = m[12] | 0;57 var m13 = m[13] | 0;58 var m14 = m[14] | 0;59 var m15 = m[15] | 0;60 var m16 = m13 ^ m8 ^ m2 ^ m0;61 m16 = (m16 << 1) | (m16 >>> 31);62 var m17 = m14 ^ m9 ^ m3 ^ m1;63 m17 = (m17 << 1) | (m17 >>> 31);64 var m18 = m15 ^ m10 ^ m4 ^ m2;65 m18 = (m18 << 1) | (m18 >>> 31);66 var m19 = m16 ^ m11 ^ m5 ^ m3;67 m19 = (m19 << 1) | (m19 >>> 31);68 var m20 = m17 ^ m12 ^ m6 ^ m4;69 m20 = (m20 << 1) | (m20 >>> 31);70 var m21 = m18 ^ m13 ^ m7 ^ m5;71 m21 = (m21 << 1) | (m21 >>> 31);72 var m22 = m19 ^ m14 ^ m8 ^ m6;73 m22 = (m22 << 1) | (m22 >>> 31);74 var m23 = m20 ^ m15 ^ m9 ^ m7;75 m23 = (m23 << 1) | (m23 >>> 31);76 var m24 = m21 ^ m16 ^ m10 ^ m8;77 m24 = (m24 << 1) | (m24 >>> 31);78 var m25 = m22 ^ m17 ^ m11 ^ m9;79 m25 = (m25 << 1) | (m25 >>> 31);80 var m26 = m23 ^ m18 ^ m12 ^ m10;81 m26 = (m26 << 1) | (m26 >>> 31);82 var m27 = m24 ^ m19 ^ m13 ^ m11;83 m27 = (m27 << 1) | (m27 >>> 31);84 var m28 = m25 ^ m20 ^ m14 ^ m12;85 m28 = (m28 << 1) | (m28 >>> 31);86 var m29 = m26 ^ m21 ^ m15 ^ m13;87 m29 = (m29 << 1) | (m29 >>> 31);88 var m30 = m27 ^ m22 ^ m16 ^ m14;89 m30 = (m30 << 1) | (m30 >>> 31);90 var m31 = m28 ^ m23 ^ m17 ^ m15;91 m31 = (m31 << 1) | (m31 >>> 31);92 var m32 = m29 ^ m24 ^ m18 ^ m16;93 m32 = (m32 << 1) | (m32 >>> 31);94 var m33 = m30 ^ m25 ^ m19 ^ m17;95 m33 = (m33 << 1) | (m33 >>> 31);96 var m34 = m31 ^ m26 ^ m20 ^ m18;97 m34 = (m34 << 1) | (m34 >>> 31);98 var m35 = m32 ^ m27 ^ m21 ^ m19;99 m35 = (m35 << 1) | (m35 >>> 31);100 var m36 = m33 ^ m28 ^ m22 ^ m20;101 m36 = (m36 << 1) | (m36 >>> 31);102 var m37 = m34 ^ m29 ^ m23 ^ m21;103 m37 = (m37 << 1) | (m37 >>> 31);104 var m38 = m35 ^ m30 ^ m24 ^ m22;105 m38 = (m38 << 1) | (m38 >>> 31);106 var m39 = m36 ^ m31 ^ m25 ^ m23;107 m39 = (m39 << 1) | (m39 >>> 31);108 var m40 = m37 ^ m32 ^ m26 ^ m24;109 m40 = (m40 << 1) | (m40 >>> 31);110 var m41 = m38 ^ m33 ^ m27 ^ m25;111 m41 = (m41 << 1) | (m41 >>> 31);112 var m42 = m39 ^ m34 ^ m28 ^ m26;113 m42 = (m42 << 1) | (m42 >>> 31);114 var m43 = m40 ^ m35 ^ m29 ^ m27;115 m43 = (m43 << 1) | (m43 >>> 31);116 var m44 = m41 ^ m36 ^ m30 ^ m28;117 m44 = (m44 << 1) | (m44 >>> 31);118 var m45 = m42 ^ m37 ^ m31 ^ m29;119 m45 = (m45 << 1) | (m45 >>> 31);120 var m46 = m43 ^ m38 ^ m32 ^ m30;121 m46 = (m46 << 1) | (m46 >>> 31);122 var m47 = m44 ^ m39 ^ m33 ^ m31;123 m47 = (m47 << 1) | (m47 >>> 31);124 var m48 = m45 ^ m40 ^ m34 ^ m32;125 m48 = (m48 << 1) | (m48 >>> 31);126 var m49 = m46 ^ m41 ^ m35 ^ m33;127 m49 = (m49 << 1) | (m49 >>> 31);128 var m50 = m47 ^ m42 ^ m36 ^ m34;129 m50 = (m50 << 1) | (m50 >>> 31);130 var m51 = m48 ^ m43 ^ m37 ^ m35;131 m51 = (m51 << 1) | (m51 >>> 31);132 var m52 = m49 ^ m44 ^ m38 ^ m36;133 m52 = (m52 << 1) | (m52 >>> 31);134 var m53 = m50 ^ m45 ^ m39 ^ m37;135 m53 = (m53 << 1) | (m53 >>> 31);136 var m54 = m51 ^ m46 ^ m40 ^ m38;137 m54 = (m54 << 1) | (m54 >>> 31);138 var m55 = m52 ^ m47 ^ m41 ^ m39;139 m55 = (m55 << 1) | (m55 >>> 31);140 var m56 = m53 ^ m48 ^ m42 ^ m40;141 m56 = (m56 << 1) | (m56 >>> 31);142 var m57 = m54 ^ m49 ^ m43 ^ m41;143 m57 = (m57 << 1) | (m57 >>> 31);144 var m58 = m55 ^ m50 ^ m44 ^ m42;145 m58 = (m58 << 1) | (m58 >>> 31);146 var m59 = m56 ^ m51 ^ m45 ^ m43;147 m59 = (m59 << 1) | (m59 >>> 31);148 var m60 = m57 ^ m52 ^ m46 ^ m44;149 m60 = (m60 << 1) | (m60 >>> 31);150 var m61 = m58 ^ m53 ^ m47 ^ m45;151 m61 = (m61 << 1) | (m61 >>> 31);152 var m62 = m59 ^ m54 ^ m48 ^ m46;153 m62 = (m62 << 1) | (m62 >>> 31);154 var m63 = m60 ^ m55 ^ m49 ^ m47;155 m63 = (m63 << 1) | (m63 >>> 31);156 var m64 = m61 ^ m56 ^ m50 ^ m48;157 m64 = (m64 << 1) | (m64 >>> 31);158 var m65 = m62 ^ m57 ^ m51 ^ m49;159 m65 = (m65 << 1) | (m65 >>> 31);160 var m66 = m63 ^ m58 ^ m52 ^ m50;161 m66 = (m66 << 1) | (m66 >>> 31);162 var m67 = m64 ^ m59 ^ m53 ^ m51;163 m67 = (m67 << 1) | (m67 >>> 31);164 var m68 = m65 ^ m60 ^ m54 ^ m52;165 m68 = (m68 << 1) | (m68 >>> 31);166 var m69 = m66 ^ m61 ^ m55 ^ m53;167 m69 = (m69 << 1) | (m69 >>> 31);168 var m70 = m67 ^ m62 ^ m56 ^ m54;169 m70 = (m70 << 1) | (m70 >>> 31);170 var m71 = m68 ^ m63 ^ m57 ^ m55;171 m71 = (m71 << 1) | (m71 >>> 31);172 var m72 = m69 ^ m64 ^ m58 ^ m56;173 m72 = (m72 << 1) | (m72 >>> 31);174 var m73 = m70 ^ m65 ^ m59 ^ m57;175 m73 = (m73 << 1) | (m73 >>> 31);176 var m74 = m71 ^ m66 ^ m60 ^ m58;177 m74 = (m74 << 1) | (m74 >>> 31);178 var m75 = m72 ^ m67 ^ m61 ^ m59;179 m75 = (m75 << 1) | (m75 >>> 31);180 var m76 = m73 ^ m68 ^ m62 ^ m60;181 m76 = (m76 << 1) | (m76 >>> 31);182 var m77 = m74 ^ m69 ^ m63 ^ m61;183 m77 = (m77 << 1) | (m77 >>> 31);184 var m78 = m75 ^ m70 ^ m64 ^ m62;185 m78 = (m78 << 1) | (m78 >>> 31);186 var m79 = m76 ^ m71 ^ m65 ^ m63;187 m79 = (m79 << 1) | (m79 >>> 31);188189 // Inline round 1190 var f = (s1 & s2) | (~s1 & s3);191 s1 = (s1 << 30) | (s1 >>> 2);192 s4 = f + s4 + ((s0 << 5) | (s0 >>> 27)) + m0 + ROUND_CONSTANT_0;193194 // Inline round 2195 var f = (s0 & s1) | (~s0 & s2);196 s0 = (s0 << 30) | (s0 >>> 2);197 s3 = f + s3 + ((s4 << 5) | (s4 >>> 27)) + m1 + ROUND_CONSTANT_0;198199 // Inline round 3200 var f = (s4 & s0) | (~s4 & s1);201 s4 = (s4 << 30) | (s4 >>> 2);202 s2 = f + s2 + ((s3 << 5) | (s3 >>> 27)) + m2 + ROUND_CONSTANT_0;203204 // Inline round 4205 var f = (s3 & s4) | (~s3 & s0);206 s3 = (s3 << 30) | (s3 >>> 2);207 s1 = f + s1 + ((s2 << 5) | (s2 >>> 27)) + m3 + ROUND_CONSTANT_0;208209 // Inline round 5210 var f = (s2 & s3) | (~s2 & s4);211 s2 = (s2 << 30) | (s2 >>> 2);212 s0 = f + s0 + ((s1 << 5) | (s1 >>> 27)) + m4 + ROUND_CONSTANT_0;213214 // Inline round 6215 var f = (s1 & s2) | (~s1 & s3);216 s1 = (s1 << 30) | (s1 >>> 2);217 s4 = f + s4 + ((s0 << 5) | (s0 >>> 27)) + m5 + ROUND_CONSTANT_0;218219 // Inline round 7220 var f = (s0 & s1) | (~s0 & s2);221 s0 = (s0 << 30) | (s0 >>> 2);222 s3 = f + s3 + ((s4 << 5) | (s4 >>> 27)) + m6 + ROUND_CONSTANT_0;223224 // Inline round 8225 var f = (s4 & s0) | (~s4 & s1);226 s4 = (s4 << 30) | (s4 >>> 2);227 s2 = f + s2 + ((s3 << 5) | (s3 >>> 27)) + m7 + ROUND_CONSTANT_0;228229 // Inline round 9230 var f = (s3 & s4) | (~s3 & s0);231 s3 = (s3 << 30) | (s3 >>> 2);232 s1 = f + s1 + ((s2 << 5) | (s2 >>> 27)) + m8 + ROUND_CONSTANT_0;233234 // Inline round 10235 var f = (s2 & s3) | (~s2 & s4);236 s2 = (s2 << 30) | (s2 >>> 2);237 s0 = f + s0 + ((s1 << 5) | (s1 >>> 27)) + m9 + ROUND_CONSTANT_0;238239 // Inline round 11240 var f = (s1 & s2) | (~s1 & s3);241 s1 = (s1 << 30) | (s1 >>> 2);242 s4 = f + s4 + ((s0 << 5) | (s0 >>> 27)) + m10 + ROUND_CONSTANT_0;243244 // Inline round 12245 var f = (s0 & s1) | (~s0 & s2);246 s0 = (s0 << 30) | (s0 >>> 2);247 s3 = f + s3 + ((s4 << 5) | (s4 >>> 27)) + m11 + ROUND_CONSTANT_0;248249 // Inline round 13250 var f = (s4 & s0) | (~s4 & s1);251 s4 = (s4 << 30) | (s4 >>> 2);252 s2 = f + s2 + ((s3 << 5) | (s3 >>> 27)) + m12 + ROUND_CONSTANT_0;253254 // Inline round 14255 var f = (s3 & s4) | (~s3 & s0);256 s3 = (s3 << 30) | (s3 >>> 2);257 s1 = f + s1 + ((s2 << 5) | (s2 >>> 27)) + m13 + ROUND_CONSTANT_0;258259 // Inline round 15260 var f = (s2 & s3) | (~s2 & s4);261 s2 = (s2 << 30) | (s2 >>> 2);262 s0 = f + s0 + ((s1 << 5) | (s1 >>> 27)) + m14 + ROUND_CONSTANT_0;263264 // Inline round 16265 var f = (s1 & s2) | (~s1 & s3);266 s1 = (s1 << 30) | (s1 >>> 2);267 s4 = f + s4 + ((s0 << 5) | (s0 >>> 27)) + m15 + ROUND_CONSTANT_0;268269 // Inline round 17270 var f = (s0 & s1) | (~s0 & s2);271 s0 = (s0 << 30) | (s0 >>> 2);272 s3 = f + s3 + ((s4 << 5) | (s4 >>> 27)) + m16 + ROUND_CONSTANT_0;273274 // Inline round 18275 var f = (s4 & s0) | (~s4 & s1);276 s4 = (s4 << 30) | (s4 >>> 2);277 s2 = f + s2 + ((s3 << 5) | (s3 >>> 27)) + m17 + ROUND_CONSTANT_0;278279 // Inline round 19280 var f = (s3 & s4) | (~s3 & s0);281 s3 = (s3 << 30) | (s3 >>> 2);282 s1 = f + s1 + ((s2 << 5) | (s2 >>> 27)) + m18 + ROUND_CONSTANT_0;283284 // Inline round 20285 var f = (s2 & s3) | (~s2 & s4);286 s2 = (s2 << 30) | (s2 >>> 2);287 s0 = f + s0 + ((s1 << 5) | (s1 >>> 27)) + m19 + ROUND_CONSTANT_0;288289 // Inline round 21290 var f = s1 ^ s2 ^ s3;291 s1 = (s1 << 30) | (s1 >>> 2);292 s4 = f + s4 + ((s0 << 5) | (s0 >>> 27)) + m20 + ROUND_CONSTANT_1;293294 // Inline round 22295 var f = s0 ^ s1 ^ s2;296 s0 = (s0 << 30) | (s0 >>> 2);297 s3 = f + s3 + ((s4 << 5) | (s4 >>> 27)) + m21 + ROUND_CONSTANT_1;298299 // Inline round 23300 var f = s4 ^ s0 ^ s1;301 s4 = (s4 << 30) | (s4 >>> 2);302 s2 = f + s2 + ((s3 << 5) | (s3 >>> 27)) + m22 + ROUND_CONSTANT_1;303304 // Inline round 24305 var f = s3 ^ s4 ^ s0;306 s3 = (s3 << 30) | (s3 >>> 2);307 s1 = f + s1 + ((s2 << 5) | (s2 >>> 27)) + m23 + ROUND_CONSTANT_1;308309 // Inline round 25310 var f = s2 ^ s3 ^ s4;311 s2 = (s2 << 30) | (s2 >>> 2);312 s0 = f + s0 + ((s1 << 5) | (s1 >>> 27)) + m24 + ROUND_CONSTANT_1;313314 // Inline round 26315 var f = s1 ^ s2 ^ s3;316 s1 = (s1 << 30) | (s1 >>> 2);317 s4 = f + s4 + ((s0 << 5) | (s0 >>> 27)) + m25 + ROUND_CONSTANT_1;318319 // Inline round 27320 var f = s0 ^ s1 ^ s2;321 s0 = (s0 << 30) | (s0 >>> 2);322 s3 = f + s3 + ((s4 << 5) | (s4 >>> 27)) + m26 + ROUND_CONSTANT_1;323324 // Inline round 28325 var f = s4 ^ s0 ^ s1;326 s4 = (s4 << 30) | (s4 >>> 2);327 s2 = f + s2 + ((s3 << 5) | (s3 >>> 27)) + m27 + ROUND_CONSTANT_1;328329 // Inline round 29330 var f = s3 ^ s4 ^ s0;331 s3 = (s3 << 30) | (s3 >>> 2);332 s1 = f + s1 + ((s2 << 5) | (s2 >>> 27)) + m28 + ROUND_CONSTANT_1;333334 // Inline round 30335 var f = s2 ^ s3 ^ s4;336 s2 = (s2 << 30) | (s2 >>> 2);337 s0 = f + s0 + ((s1 << 5) | (s1 >>> 27)) + m29 + ROUND_CONSTANT_1;338339 // Inline round 31340 var f = s1 ^ s2 ^ s3;341 s1 = (s1 << 30) | (s1 >>> 2);342 s4 = f + s4 + ((s0 << 5) | (s0 >>> 27)) + m30 + ROUND_CONSTANT_1;343344 // Inline round 32345 var f = s0 ^ s1 ^ s2;346 s0 = (s0 << 30) | (s0 >>> 2);347 s3 = f + s3 + ((s4 << 5) | (s4 >>> 27)) + m31 + ROUND_CONSTANT_1;348349 // Inline round 33350 var f = s4 ^ s0 ^ s1;351 s4 = (s4 << 30) | (s4 >>> 2);352 s2 = f + s2 + ((s3 << 5) | (s3 >>> 27)) + m32 + ROUND_CONSTANT_1;353354 // Inline round 34355 var f = s3 ^ s4 ^ s0;356 s3 = (s3 << 30) | (s3 >>> 2);357 s1 = f + s1 + ((s2 << 5) | (s2 >>> 27)) + m33 + ROUND_CONSTANT_1;358359 // Inline round 35360 var f = s2 ^ s3 ^ s4;361 s2 = (s2 << 30) | (s2 >>> 2);362 s0 = f + s0 + ((s1 << 5) | (s1 >>> 27)) + m34 + ROUND_CONSTANT_1;363364 // Inline round 36365 var f = s1 ^ s2 ^ s3;366 s1 = (s1 << 30) | (s1 >>> 2);367 s4 = f + s4 + ((s0 << 5) | (s0 >>> 27)) + m35 + ROUND_CONSTANT_1;368369 // Inline round 37370 var f = s0 ^ s1 ^ s2;371 s0 = (s0 << 30) | (s0 >>> 2);372 s3 = f + s3 + ((s4 << 5) | (s4 >>> 27)) + m36 + ROUND_CONSTANT_1;373374 // Inline round 38375 var f = s4 ^ s0 ^ s1;376 s4 = (s4 << 30) | (s4 >>> 2);377 s2 = f + s2 + ((s3 << 5) | (s3 >>> 27)) + m37 + ROUND_CONSTANT_1;378379 // Inline round 39380 var f = s3 ^ s4 ^ s0;381 s3 = (s3 << 30) | (s3 >>> 2);382 s1 = f + s1 + ((s2 << 5) | (s2 >>> 27)) + m38 + ROUND_CONSTANT_1;383384 // Inline round 40385 var f = s2 ^ s3 ^ s4;386 s2 = (s2 << 30) | (s2 >>> 2);387 s0 = f + s0 + ((s1 << 5) | (s1 >>> 27)) + m39 + ROUND_CONSTANT_1;388389 // Inline round 41390 var f = (s1 & s2) | (s1 & s3) | (s2 & s3);391 s1 = (s1 << 30) | (s1 >>> 2);392 s4 = f + s4 + ((s0 << 5) | (s0 >>> 27)) + m40 + ROUND_CONSTANT_2;393394 // Inline round 42395 var f = (s0 & s1) | (s0 & s2) | (s1 & s2);396 s0 = (s0 << 30) | (s0 >>> 2);397 s3 = f + s3 + ((s4 << 5) | (s4 >>> 27)) + m41 + ROUND_CONSTANT_2;398399 // Inline round 43400 var f = (s4 & s0) | (s4 & s1) | (s0 & s1);401 s4 = (s4 << 30) | (s4 >>> 2);402 s2 = f + s2 + ((s3 << 5) | (s3 >>> 27)) + m42 + ROUND_CONSTANT_2;403404 // Inline round 44405 var f = (s3 & s4) | (s3 & s0) | (s4 & s0);406 s3 = (s3 << 30) | (s3 >>> 2);407 s1 = f + s1 + ((s2 << 5) | (s2 >>> 27)) + m43 + ROUND_CONSTANT_2;408409 // Inline round 45410 var f = (s2 & s3) | (s2 & s4) | (s3 & s4);411 s2 = (s2 << 30) | (s2 >>> 2);412 s0 = f + s0 + ((s1 << 5) | (s1 >>> 27)) + m44 + ROUND_CONSTANT_2;413414 // Inline round 46415 var f = (s1 & s2) | (s1 & s3) | (s2 & s3);416 s1 = (s1 << 30) | (s1 >>> 2);417 s4 = f + s4 + ((s0 << 5) | (s0 >>> 27)) + m45 + ROUND_CONSTANT_2;418419 // Inline round 47420 var f = (s0 & s1) | (s0 & s2) | (s1 & s2);421 s0 = (s0 << 30) | (s0 >>> 2);422 s3 = f + s3 + ((s4 << 5) | (s4 >>> 27)) + m46 + ROUND_CONSTANT_2;423424 // Inline round 48425 var f = (s4 & s0) | (s4 & s1) | (s0 & s1);426 s4 = (s4 << 30) | (s4 >>> 2);427 s2 = f + s2 + ((s3 << 5) | (s3 >>> 27)) + m47 + ROUND_CONSTANT_2;428429 // Inline round 49430 var f = (s3 & s4) | (s3 & s0) | (s4 & s0);431 s3 = (s3 << 30) | (s3 >>> 2);432 s1 = f + s1 + ((s2 << 5) | (s2 >>> 27)) + m48 + ROUND_CONSTANT_2;433434 // Inline round 50435 var f = (s2 & s3) | (s2 & s4) | (s3 & s4);436 s2 = (s2 << 30) | (s2 >>> 2);437 s0 = f + s0 + ((s1 << 5) | (s1 >>> 27)) + m49 + ROUND_CONSTANT_2;438439 // Inline round 51440 var f = (s1 & s2) | (s1 & s3) | (s2 & s3);441 s1 = (s1 << 30) | (s1 >>> 2);442 s4 = f + s4 + ((s0 << 5) | (s0 >>> 27)) + m50 + ROUND_CONSTANT_2;443444 // Inline round 52445 var f = (s0 & s1) | (s0 & s2) | (s1 & s2);446 s0 = (s0 << 30) | (s0 >>> 2);447 s3 = f + s3 + ((s4 << 5) | (s4 >>> 27)) + m51 + ROUND_CONSTANT_2;448449 // Inline round 53450 var f = (s4 & s0) | (s4 & s1) | (s0 & s1);451 s4 = (s4 << 30) | (s4 >>> 2);452 s2 = f + s2 + ((s3 << 5) | (s3 >>> 27)) + m52 + ROUND_CONSTANT_2;453454 // Inline round 54455 var f = (s3 & s4) | (s3 & s0) | (s4 & s0);456 s3 = (s3 << 30) | (s3 >>> 2);457 s1 = f + s1 + ((s2 << 5) | (s2 >>> 27)) + m53 + ROUND_CONSTANT_2;458459 // Inline round 55460 var f = (s2 & s3) | (s2 & s4) | (s3 & s4);461 s2 = (s2 << 30) | (s2 >>> 2);462 s0 = f + s0 + ((s1 << 5) | (s1 >>> 27)) + m54 + ROUND_CONSTANT_2;463464 // Inline round 56465 var f = (s1 & s2) | (s1 & s3) | (s2 & s3);466 s1 = (s1 << 30) | (s1 >>> 2);467 s4 = f + s4 + ((s0 << 5) | (s0 >>> 27)) + m55 + ROUND_CONSTANT_2;468469 // Inline round 57470 var f = (s0 & s1) | (s0 & s2) | (s1 & s2);471 s0 = (s0 << 30) | (s0 >>> 2);472 s3 = f + s3 + ((s4 << 5) | (s4 >>> 27)) + m56 + ROUND_CONSTANT_2;473474 // Inline round 58475 var f = (s4 & s0) | (s4 & s1) | (s0 & s1);476 s4 = (s4 << 30) | (s4 >>> 2);477 s2 = f + s2 + ((s3 << 5) | (s3 >>> 27)) + m57 + ROUND_CONSTANT_2;478479 // Inline round 59480 var f = (s3 & s4) | (s3 & s0) | (s4 & s0);481 s3 = (s3 << 30) | (s3 >>> 2);482 s1 = f + s1 + ((s2 << 5) | (s2 >>> 27)) + m58 + ROUND_CONSTANT_2;483484 // Inline round 60485 var f = (s2 & s3) | (s2 & s4) | (s3 & s4);486 s2 = (s2 << 30) | (s2 >>> 2);487 s0 = f + s0 + ((s1 << 5) | (s1 >>> 27)) + m59 + ROUND_CONSTANT_2;488489 // Inline round 61490 var f = s1 ^ s2 ^ s3;491 s1 = (s1 << 30) | (s1 >>> 2);492 s4 = f + s4 + ((s0 << 5) | (s0 >>> 27)) + m60 + ROUND_CONSTANT_3;493494 // Inline round 62495 var f = s0 ^ s1 ^ s2;496 s0 = (s0 << 30) | (s0 >>> 2);497 s3 = f + s3 + ((s4 << 5) | (s4 >>> 27)) + m61 + ROUND_CONSTANT_3;498499 // Inline round 63500 var f = s4 ^ s0 ^ s1;501 s4 = (s4 << 30) | (s4 >>> 2);502 s2 = f + s2 + ((s3 << 5) | (s3 >>> 27)) + m62 + ROUND_CONSTANT_3;503504 // Inline round 64505 var f = s3 ^ s4 ^ s0;506 s3 = (s3 << 30) | (s3 >>> 2);507 s1 = f + s1 + ((s2 << 5) | (s2 >>> 27)) + m63 + ROUND_CONSTANT_3;508509 // Inline round 65510 var f = s2 ^ s3 ^ s4;511 s2 = (s2 << 30) | (s2 >>> 2);512 s0 = f + s0 + ((s1 << 5) | (s1 >>> 27)) + m64 + ROUND_CONSTANT_3;513514 // Inline round 66515 var f = s1 ^ s2 ^ s3;516 s1 = (s1 << 30) | (s1 >>> 2);517 s4 = f + s4 + ((s0 << 5) | (s0 >>> 27)) + m65 + ROUND_CONSTANT_3;518519 // Inline round 67520 var f = s0 ^ s1 ^ s2;521 s0 = (s0 << 30) | (s0 >>> 2);522 s3 = f + s3 + ((s4 << 5) | (s4 >>> 27)) + m66 + ROUND_CONSTANT_3;523524 // Inline round 68525 var f = s4 ^ s0 ^ s1;526 s4 = (s4 << 30) | (s4 >>> 2);527 s2 = f + s2 + ((s3 << 5) | (s3 >>> 27)) + m67 + ROUND_CONSTANT_3;528529 // Inline round 69530 var f = s3 ^ s4 ^ s0;531 s3 = (s3 << 30) | (s3 >>> 2);532 s1 = f + s1 + ((s2 << 5) | (s2 >>> 27)) + m68 + ROUND_CONSTANT_3;533534 // Inline round 70535 var f = s2 ^ s3 ^ s4;536 s2 = (s2 << 30) | (s2 >>> 2);537 s0 = f + s0 + ((s1 << 5) | (s1 >>> 27)) + m69 + ROUND_CONSTANT_3;538539 // Inline round 71540 var f = s1 ^ s2 ^ s3;541 s1 = (s1 << 30) | (s1 >>> 2);542 s4 = f + s4 + ((s0 << 5) | (s0 >>> 27)) + m70 + ROUND_CONSTANT_3;543544 // Inline round 72545 var f = s0 ^ s1 ^ s2;546 s0 = (s0 << 30) | (s0 >>> 2);547 s3 = f + s3 + ((s4 << 5) | (s4 >>> 27)) + m71 + ROUND_CONSTANT_3;548549 // Inline round 73550 var f = s4 ^ s0 ^ s1;551 s4 = (s4 << 30) | (s4 >>> 2);552 s2 = f + s2 + ((s3 << 5) | (s3 >>> 27)) + m72 + ROUND_CONSTANT_3;553554 // Inline round 74555 var f = s3 ^ s4 ^ s0;556 s3 = (s3 << 30) | (s3 >>> 2);557 s1 = f + s1 + ((s2 << 5) | (s2 >>> 27)) + m73 + ROUND_CONSTANT_3;558559 // Inline round 75560 var f = s2 ^ s3 ^ s4;561 s2 = (s2 << 30) | (s2 >>> 2);562 s0 = f + s0 + ((s1 << 5) | (s1 >>> 27)) + m74 + ROUND_CONSTANT_3;563564 // Inline round 76565 var f = s1 ^ s2 ^ s3;566 s1 = (s1 << 30) | (s1 >>> 2);567 s4 = f + s4 + ((s0 << 5) | (s0 >>> 27)) + m75 + ROUND_CONSTANT_3;568569 // Inline round 77570 var f = s0 ^ s1 ^ s2;571 s0 = (s0 << 30) | (s0 >>> 2);572 s3 = f + s3 + ((s4 << 5) | (s4 >>> 27)) + m76 + ROUND_CONSTANT_3;573574 // Inline round 78575 var f = s4 ^ s0 ^ s1;576 s4 = (s4 << 30) | (s4 >>> 2);577 s2 = f + s2 + ((s3 << 5) | (s3 >>> 27)) + m77 + ROUND_CONSTANT_3;578579 // Inline round 79580 var f = s3 ^ s4 ^ s0;581 s3 = (s3 << 30) | (s3 >>> 2);582 s1 = f + s1 + ((s2 << 5) | (s2 >>> 27)) + m78 + ROUND_CONSTANT_3;583584 // Inline round 80585 var f = s2 ^ s3 ^ s4;586 s2 = (s2 << 30) | (s2 >>> 2);587 s0 = f + s0 + ((s1 << 5) | (s1 >>> 27)) + m79 + ROUND_CONSTANT_3;588589 // Update state590 s[0] = (_s0 + s0) | 0;591 s[1] = (_s1 + s1) | 0;592 s[2] = (_s2 + s2) | 0;593 s[3] = (_s3 + s3) | 0;594 s[4] = (_s4 + s4) | 0;595 },596597 _doFinalize: function () {598 // Shortcuts599 var data = this._data;600 var dataWords = data.words;601 var nBitsLeft = data.sigBytes * 8;602 var nBitsTotalLsw = this._nDataBitsLsw;603 var nBitsTotalMsw = this._nDataBitsMsw;604605 // Add padding606 dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);607608 var lengthStartIndex = (((nBitsLeft + 64) >>> 9) << 4) + 14;609 dataWords[lengthStartIndex] = nBitsTotalMsw;610 dataWords[lengthStartIndex + 1] = nBitsTotalLsw;611612 data.sigBytes = dataWords.length * 4;613614 // Hash final blocks615 this._process();616617 // Return final hash618 return new WordArray(this._state);619 },620621 clone: function () {622 var clone = SHA1.$super.prototype.clone.call(this);623 clone._state = clone._state.slice(0);624625 return clone;626 }627 }); ...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1app.controller('myCtrl', function($scope, $rootScope) {2 $rootScope.s4 = function() {3 return Math.floor((1 + Math.random()) * 0x10000)4 .toString(16)5 .substring(1);6 };7});

Full Screen

Using AI Code Generation

copy

Full Screen

1var rootController = require('rootController');2var s4 = rootController.s4;3s4();4var s1 = require('s1');5var s2 = require('s2');6var s3 = require('s3');7var s4 = require('s4');8exports.s4 = function(){9 console.log('s4');10}

Full Screen

Using AI Code Generation

copy

Full Screen

1var root = require('root');2root.s4();3root.s5();4root.s6();5var root = require('root');6module.exports.s4 = function() {root.s4();};7module.exports.s5 = function() {root.s5();};8module.exports.s6 = function() {root.s6();};9var root = require('root');10module.exports.s4 = function() {root.s4();};11module.exports.s5 = function() {root.s5();};12module.exports.s6 = function() {root.s6();};13var root = require('root');14module.exports.s4 = function() {root.s4();};15module.exports.s5 = function() {root.s5();};16module.exports.s6 = function() {root.s6();};17var root = require('root');18module.exports.s4 = function() {root.s4();};19module.exports.s5 = function() {root.s5();};20module.exports.s6 = function() {root.s6();};21var root = require('root');22module.exports.s4 = function() {root.s4();};23module.exports.s5 = function() {root.s5();};24module.exports.s6 = function() {root.s6();};25var root = require('root');26module.exports.s4 = function() {root.s4();};27module.exports.s5 = function() {root.s5();};28module.exports.s6 = function() {root.s6();};29var root = require('root');30module.exports.s4 = function() {root.s4();};31module.exports.s5 = function() {root.s5();};32module.exports.s6 = function() {root.s6();};33var root = require('root');34module.exports.s4 = function() {root.s4();};35module.exports.s5 = function() {root

Full Screen

Using AI Code Generation

copy

Full Screen

1var s4 = root.s4;2s4('selector').addClass('class');3var s4 = root.s4;4s4('selector').addClass('class');5var s4 = root.s4;6s4('selector').addClass('class');7var s4 = root.s4;8s4('selector').addClass('class');9var s4 = root.s4;10s4('selector').addClass('class');11var s4 = root.s4;12s4('selector').addClass('class');13var s4 = root.s4;14s4('selector').addClass('class');15var s4 = root.s4;16s4('selector').addClass('class');17var s4 = root.s4;18s4('selector').addClass('class');19var s4 = root.s4;20s4('selector').addClass('class');21var s4 = root.s4;22s4('selector').addClass('class');23var s4 = root.s4;24s4('selector').addClass('class');25var s4 = root.s4;26s4('selector').addClass('class');27var s4 = root.s4;28s4('selector').addClass('class');29var s4 = root.s4;30s4('selector').addClass

Full Screen

Using AI Code Generation

copy

Full Screen

1var test = {2 init: function() {3 var self = this;4 self.s4();5 },6 s4: function() {7 var self = this;8 var s4 = new S4();9 s4.init();10 }11};12var S4 = function() {13 var self = this;14 self.init = function() {15 var s3 = new S3();16 s3.init();17 };18};19var S3 = function() {20 var self = this;21 self.init = function() {22 var s2 = new S2();23 s2.init();24 };25};26var S2 = function() {27 var self = this;28 self.init = function() {29 var s1 = new S1();30 s1.init();31 };32};33var S1 = function() {34 var self = this;35 self.init = function() {36 var s0 = new S0();37 s0.init();38 };39};40var S0 = function() {41 var self = this;42 self.init = function() {43 var s0 = new S0();44 s0.init();45 };46};47var root = {48 init: function() {49 var self = this;50 self.s0();51 },52 s0: function() {53 var self = this;54 console.log('s0');55 }56};57root.init();

Full Screen

Using AI Code Generation

copy

Full Screen

1var s4 = require('s4');2var s4 = new s4();3var s4 = require('s4').s4;4var s4 = require('s4').s4;5var s4 = new s4();6var s4 = require('s4');7var s4 = require('s4');8var s4 = require('s4').s4;9var s4 = require('s4').s4;10var s4 = new s4();11var s4 = require('s4');12var s4 = require('s4');13var s4 = require('s4').s4;14var s4 = require('s4').s4;15var s4 = new s4();16var s4 = require('s4');17var s4 = require('s4');18var s4 = require('s4').s4;

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run root automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful