How to use s2 method in fast-check-monorepo

Best JavaScript code snippet using fast-check-monorepo

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

calificacion-estilismoS2.controller.js

Source:calificacion-estilismoS2.controller.js Github

copy

Full Screen

1const modeloCalificacionS2 = require('./../models/calificaciones/calificacion-estilismoS2.model');2module.exports.registrarCalificacionesS2 = function(req,res){3 let modeloDatos = new modeloCalificacionS2(req.body);4 modeloDatos.save(5 function( err,doc ){6 if( !err ){7 res.send(doc);8 }else{9 if (err.code == 11000) {10 res.status(422).send(["¡La calificacion de este alumno ya existe!"]);11 } else {12 return next(err);13 }14 }15 }16 );17}18module.exports.traerCalificacion = async (req,res) => {19 let modelo = await modeloCalificacionS2.find({numero_credencial:req.body.numero_credencial});20 if(!modelo){21 res.status(404).json(["No se encontro registro"]);22 }23 res.json(modelo);24}25module.exports.actualizarCalificacionesEstilismoS2 = async (req,res)=>{26 try{27 28 const { 29 numero_credencial,30 especialidad,31 grupo,32 peinado_S2,33 automaquillaje_S2,34 permacologia_S2,35 sistemaSPA,36 colorimetria_1,37 imagen_S2,38 brigada_s2,39 desarrollo_humano_S2,40 peinado_S2_2,41 automaquillaje_S2_2,42 cejas_pestañas_S2_2,43 permacologia_1,44 permacologia_S2_2,45 uñas_acrilicas_S2,46 dibujo_diseño1_S2,47 imagen_S2_2,48 brigadas_s2_2,49 introduccion_faciales_maquillaje_S2_3,50 brushing_S2_3,51 planchado_expres_S2_3,52 peinado2_S2_3,53 trensado_S2_3,54 automaquillaje_S2_3,55 diseño_ceja_S2_3,56 tratamientos_capilares_S2_3,57 corte_cabello2_S2_3,58 sistemaSPA_S2_3,59 colorimetria1_S2_3,60 quimica_S2_3, 61 imagen_S2_3,62 brigadas_S2_363 } = req.body;64 let Datos = await modeloCalificacionS2.findById(req.params.id);65 if(!Datos){66 res.status(404).json({ msg: "Calificación del estudiante no encontrada." });67 }68 Datos.numero_credencial = numero_credencial;69 Datos.grupo = grupo;70 Datos.peinado_S2 = peinado_S2;71 Datos.automaquillaje_S2 = automaquillaje_S2;72 Datos.permacologia_S2 = permacologia_S2;73 Datos.sistemaSPA = sistemaSPA;74 Datos.colorimetria_1 = colorimetria_1;75 Datos.imagen_S2 = imagen_S2;76 Datos.brigada_s2 = brigada_s2;77 Datos.desarrollo_humano_S2 = desarrollo_humano_S2;78 Datos.peinado_S2_2 = peinado_S2_2;79 Datos.automaquillaje_S2_2 = automaquillaje_S2_2;80 Datos.cejas_pestañas_S2_2= cejas_pestañas_S2_2;81 Datos.permacologia_1 = permacologia_1;82 Datos.permacologia_S2_2 = permacologia_S2_2;83 Datos.uñas_acrilicas_S2 = uñas_acrilicas_S2;84 Datos.dibujo_diseño1_S2 = dibujo_diseño1_S2;85 Datos.imagen_S2_2 = imagen_S2_2;86 Datos.brigadas_s2_2 = brigadas_s2_2;87 Datos.introduccion_faciales_maquillaje_S2_3 = introduccion_faciales_maquillaje_S2_3;88 Datos.brushing_S2_3 = brushing_S2_3;89 Datos.planchado_expres_S2_3 = planchado_expres_S2_3;90 Datos.peinado2_S2_3 = peinado2_S2_3;91 Datos.trensado_S2_3 = trensado_S2_3;92 Datos.automaquillaje_S2_3 = automaquillaje_S2_3;93 Datos.diseño_ceja_S2_3 = diseño_ceja_S2_3;94 Datos.tratamientos_capilares_S2_3 = tratamientos_capilares_S2_3;95 Datos.corte_cabello2_S2_3 = corte_cabello2_S2_3;96 Datos.sistemaSPA_S2_3 = sistemaSPA_S2_3;97 Datos.colorimetria1_S2_3 = colorimetria1_S2_3;98 Datos.quimica_S2_3= quimica_S2_3; 99 Datos.imagen_S2_3 = imagen_S2_3;100 Datos.brigadas_S2_3 = brigadas_S2_3;101 Datos = await modeloCalificacionS2.findByIdAndUpdate({_id:req.params.id}, Datos, {new:true});102 res.json(Datos);103 104 }catch(err){105 res.status(505).json(["No se pudo realizar la solicitud accionada."]);106 }107}108module.exports.eliminarCalificacion = async (req,res)=>{109 try{110 111 let modelo = await modeloCalificacionS2.findById(req.params.id);112 if(!modelo){113 res.status(404).json(["No se encontro documento"]);114 }115 await modeloCalificacionS2.findByIdAndRemove(req.params.id);116 }catch(err){117 res.status(505).json(["No se encontro documento"]);118 }...

Full Screen

Full Screen

dependent.js

Source:dependent.js Github

copy

Full Screen

1function testSubstrLatin1() {2 var s1 = "abcdefghijklmnopqrstuvwxyz12345678900000a";3 // Static strings.4 assertEq(s1.substr(s1.length - 1), "a");5 assertEq(s1.substr(s1.length - 2), "0a");6 assertEq(s1.substr(26, 3), "123");7 // (Fat) inline strings.8 var s2 = s1.substr(3, 5);9 assertEq(isLatin1(s2), true);10 assertEq(s2, "defgh");11 s2 = s1.substr(0, 20);12 assertEq(isLatin1(s2), true);13 assertEq(s2, "abcdefghijklmnopqrst");14 // Dependent string.15 s2 = s1.substr(1, s1.length - 2);16 assertEq(isLatin1(s2), true);17 assertEq(s2.length, 39);18 assertEq(s2, "bcdefghijklmnopqrstuvwxyz12345678900000");19 s2 = s2.substr(2).substr(1);20 assertEq(isLatin1(s2), true);21 assertEq(s2, "efghijklmnopqrstuvwxyz12345678900000");22}23testSubstrLatin1();24function testSubstrTwoByte() {25 // Two byte string.26 var s1 = "abcdefghijklmnopqrstuvwxyz12345678900000a\u1480";27 assertEq(isLatin1(s1), false);28 // Static string.29 var s2 = s1.substr(28, 1);30 assertEq(s2, "3");31 // Inline string.32 s2 = s1.substr(3, 5);33 assertEq(s2, "defgh");34 // Dependent string.35 s2 = s1.substr(2);36 assertEq(isLatin1(s2), false);37 assertEq(s2, "cdefghijklmnopqrstuvwxyz12345678900000a\u1480");38 s2 = s2.substr(2).substr(1);39 assertEq(isLatin1(s2), false);40 assertEq(s2, "fghijklmnopqrstuvwxyz12345678900000a\u1480");41}42testSubstrTwoByte();43function testSubstring() {44 var s1 = "abcdefghijklmnopqrstuvwxyz123456789000ab";45 var s2 = s1.substring(1, 8);46 assertEq(isLatin1(s2), true);47 assertEq(s2, "bcdefgh");48 s2 = s1.substring(0, s1.length - 1);49 assertEq(isLatin1(s2), true);50 assertEq(s2, "abcdefghijklmnopqrstuvwxyz123456789000a");51}52testSubstring();53function testSlice() {54 var s1 = "abcdefghijklmnopqrstuvwxyz123456789000ABC";55 var s2 = s1.slice(1, 8);56 assertEq(isLatin1(s2), true);57 assertEq(s2, "bcdefgh");58 s2 = s1.slice(0, -2);59 assertEq(isLatin1(s2), true);60 assertEq(s2, "abcdefghijklmnopqrstuvwxyz123456789000A");61}62testSlice();63function testUndepend() {64 // Latin165 var s = "abcdefg".repeat(7);66 s.indexOf("def"); // flatten67 assertEq(isLatin1(s), true);68 var dep = s.substr(7);69 var res = dep.replace(/abcdef/g, ""); // StrReplaceRegexpRemove undepends.70 assertEq(res, "gggggg");71 // TwoByte72 var s = "abcdefg\u1200".repeat(6);73 s.indexOf("def"); // flatten74 var dep = s.substr(8);75 var res = dep.replace(/abcdefg/g, ""); // StrReplaceRegexpRemove undepends.76 assertEq(res, "\u1200\u1200\u1200\u1200\u1200");77}...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const s2 = require('fast-check-monorepo/s2');2const fc = require('fast-check');3fc.assert(4 fc.property(fc.nat(), fc.nat(), (a, b) => {5 return s2(a, b) === a + b;6 })7);8const s3 = require('fast-check-monorepo/s3');9const fc = require('fast-check');10fc.assert(11 fc.property(fc.nat(), fc.nat(), (a, b) => {12 return s3(a, b) === a + b;13 })14);

Full Screen

Using AI Code Generation

copy

Full Screen

1const s2 = require('fast-check-monorepo/s2');2const s2 = require('fast-check-monorepo/s2');3console.log(s2());4const s2 = require('fast-check-monorepo/s2');5const s2 = require('fast-check-monorepo/s2');6console.log(s2());7const s2 = require('fast-check-monorepo/s2');8const s2 = require('fast-check-monorepo/s2');9console.log(s2());10const s2 = require('fast-check-monorepo/s2');11const s2 = require('fast-check-monorepo/s2');12console.log(s2());13const s2 = require('fast-check-monorepo/s2');14const s2 = require('fast-check-monorepo/s2');15console.log(s2());16const s2 = require('fast-check-monorepo/s2');17const s2 = require('fast-check-monorepo/s2');18console.log(s2());19const s2 = require('fast-check-monorepo/s2');20const s2 = require('fast-check-monorepo/s2');21console.log(s2());22const s2 = require('fast-check-monorepo/s2');23const s2 = require('fast-check-monorepo/s2');24console.log(s2());25const s2 = require('fast-check-monorepo/s2');26const s2 = require('fast-check-monorepo/s2');27console.log(s2());28const s2 = require('fast-check-monorepo/s

Full Screen

Using AI Code Generation

copy

Full Screen

1const s2 = require('fast-check-monorepo/s2');2const fc = require('fast-check');3const s2Arb = s2.s2CellIdArb();4fc.assert(5 fc.property(s2Arb, (s2id) => {6 console.log(s2id);7 return true;8 })9);

Full Screen

Using AI Code Generation

copy

Full Screen

1const s2 = require('fast-check-monorepo/lib/s2');2s2().then((result) => {3 console.log('result from s2: ' + result);4});5const s2 = require('fast-check-monorepo/lib/s2');6s2().then((result) => {7 console.log('result from s2: ' + result);8});9const s2 = require('fast-check-monorepo/lib/s2');10s2().then((result) => {11 console.log('result from s2: ' + result);12});13const s2 = require('fast-check-monorepo/lib/s2');14s2().then((result) => {15 console.log('result from s2: ' + result);16});17const s2 = require('fast-check-monorepo/lib/s2');18s2().then((result) => {19 console.log('result from s2: ' + result);20});21const s2 = require('fast-check-monorepo/lib/s2');22s2().then((result) => {23 console.log('result from s2: ' + result);24});25const s2 = require('fast-check-monorepo/lib/s2');

Full Screen

Using AI Code Generation

copy

Full Screen

1import {s2} from 'fast-check-monorepo/src/s2'2console.log(s2(10))3"dependencies": {4}5"dependencies": {6}7"dependencies": {8}9"dependencies": {10}11"dependencies": {12}13"dependencies": {14}15"dependencies": {16}17"dependencies": {18}19"dependencies": {20}21"dependencies": {

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 fast-check-monorepo 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