开启辅助访问 切换到宽版

精易论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

用微信号发送消息登录论坛

新人指南 邀请好友注册 - 我关注人的新帖 教你赚取精币 - 每日签到


求职/招聘- 论坛接单- 开发者大厅

论坛版规 总版规 - 建议/投诉 - 应聘版主 - 精华帖总集 积分说明 - 禁言标准 - 有奖举报

查看: 1535|回复: 8
收起左侧

[已解决] 【JS求助】调试一个js,参数短了可以,参数一长就卡死,是怎么回事啊

 关闭 [复制链接]
结帖率:95% (19/20)
发表于 2018-12-19 22:27:58 | 显示全部楼层 |阅读模式   上海市上海市
35精币
可以直接复制进去js调试工具里面进行调试,主要是第一行
return  LoginRsakey = new RSAKeyPair("010001", "", "A4DCEED2143805800FD0492910A613FBDA3D7F74C4DC917788E2B2EAEE0EF7C9458D090980C6BB0242D7A17E191685B05890C18655A96DEB3D20828C0F01E08E7A6F7CACD24F321001E6AD55398A726AAE9DAB558BF6185D4A34A81CE81*F571816E411CA2B44B7A1B108090F44168EEC88EA746F95D0EB81E58D189213AE27");

第三个参数这么长的话就会卡死

如果短一点就会运行正常

比如:

return  LoginRsakey = new RSAKeyPair("010001", "", "A4DCEED2143805800FD0492910A61");

下面放上全部js脚本

大神可以直接在js调试工具里面调试一下

我不懂为什么长了就会运行不动

恳请解答!!





  1. function crack() {
  2.   return  LoginRsakey = new RSAKeyPair("010001", "", "A4DCEED2143805800FD0492910A613FBDA3D7F74C4DC917788E2B2EAEE0EF7C9458D090980C6BB0242D7A17E191685B05890C18655A96DEB3D20828C0F01E08E7A6F7CACD24F321001E6AD55398A726AAE9DAB558BF6185D4A34A81CE81*F571816E411CA2B44B7A1B108090F44168EEC88EA746F95D0EB81E58D189213AE27");
  3. }


  4. // RSA, a suite of routines for performing RSA public-key computations in
  5. // JavaScript.
  6. //
  7. // Requires BigInt.js and Barrett.js.
  8. //
  9. // Copyright 1998-2005 David Shapiro.
  10. //
  11. // You may use, re-use, abuse, copy, and modify this code to your liking, but
  12. // please keep this header.
  13. //
  14. // Thanks!
  15. //
  16. // Dave Shapiro
  17. // dave@ohdave.com

  18. function RSAKeyPair(encryptionExponent, decryptionExponent, modulus) {
  19.     this.e = biFromHex(encryptionExponent);
  20.     this.d = biFromHex(decryptionExponent);
  21.     this.m = biFromHex(modulus);

  22.     // We can do two bytes per digit, so
  23.     // chunkSize = 2 * (number of digits in modulus - 1).
  24.     // Since biHighIndex returns the high index, not the number of digits, 1 has
  25.     // already been subtracted.
  26.     //this.chunkSize = 2 * biHighIndex(this.m);

  27.     ////////////////////////////////// TYF
  28.     this.digitSize = 2 * biHighIndex(this.m) + 2;
  29.     this.chunkSize = this.digitSize - 11; // maximum, anything lower is fine
  30.     ////////////////////////////////// TYF

  31.     this.radix = 16;
  32.     this.barrett = new BarrettMu(this.m);
  33. }

  34. function twoDigit(n) {
  35.     return (n < 10 ? "0" : "") + String(n);
  36. }

  37. function encryptedString(key, s)
  38. // Altered by Rob Saunders (rob@robsaunders.net). New routine pads the
  39. // string after it has been converted to an array. This fixes an
  40. // incompatibility with Flash MX's ActionScript.
  41. // Altered by Tang Yu Feng for interoperability with Microsoft's
  42. // RSACryptoServiceProvider implementation.
  43. {
  44.     ////////////////////////////////// TYF
  45.     if (key.chunkSize > key.digitSize - 11) {
  46.         return "Error";
  47.     }
  48.     ////////////////////////////////// TYF


  49.     var a = new Array();
  50.     var sl = s.length;

  51.     var i = 0;
  52.     while (i < sl) {
  53.         a[i] = s.charCodeAt(i);
  54.         i++;
  55.     }

  56.     //while (a.length % key.chunkSize != 0) {
  57.     //        a[i++] = 0;
  58.     //}

  59.     var al = a.length;
  60.     var result = "";
  61.     var j, k, block;
  62.     for (i = 0; i < al; i += key.chunkSize) {
  63.         block = new BigInt();
  64.         j = 0;

  65.         //for (k = i; k < i + key.chunkSize; ++j) {
  66.         //        block.digits[j] = a[k++];
  67.         //        block.digits[j] += a[k++] << 8;
  68.         //}

  69.         ////////////////////////////////// TYF
  70.         // Add PKCS#1 v1.5 padding
  71.         // 0x00 || 0x02 || PseudoRandomNonZeroBytes || 0x00 || Message
  72.         // Variable a before padding must be of at most digitSize-11
  73.         // That is for 3 marker bytes plus at least 8 random non-zero bytes
  74.         var x;
  75.         var msgLength = (i + key.chunkSize) > al ? al % key.chunkSize : key.chunkSize;

  76.         // Variable b with 0x00 || 0x02 at the highest index.
  77.         var b = new Array();
  78.         for (x = 0; x < msgLength; x++) {
  79.             b[x] = a[i + msgLength - 1 - x];
  80.         }
  81.         b[msgLength] = 0; // marker
  82.         var paddedSize = Math.max(8, key.digitSize - 3 - msgLength);

  83.         for (x = 0; x < paddedSize; x++) {
  84.             b[msgLength + 1 + x] = Math.floor(Math.random() * 254) + 1; // [1,255]
  85.         }
  86.         // It can be asserted that msgLength+paddedSize == key.digitSize-3
  87.         b[key.digitSize - 2] = 2; // marker
  88.         b[key.digitSize - 1] = 0; // marker

  89.         for (k = 0; k < key.digitSize; ++j) {
  90.             block.digits[j] = b[k++];
  91.             block.digits[j] += b[k++] << 8;
  92.         }
  93.         ////////////////////////////////// TYF

  94.         var crypt = key.barrett.powMod(block, key.e);
  95.         var text = key.radix == 16 ? biToHex(crypt) : biToString(crypt, key.radix);
  96.         result += text + " ";
  97.     }
  98.     return result.substring(0, result.length - 1); // Remove last space.
  99. }

  100. function decryptedString(key, s) {
  101.     var blocks = s.split(" ");
  102.     var result = "";
  103.     var i, j, block;
  104.     for (i = 0; i < blocks.length; ++i) {
  105.         var bi;
  106.         if (key.radix == 16) {
  107.             bi = biFromHex(blocks[i]);
  108.         }
  109.         else {
  110.             bi = biFromString(blocks[i], key.radix);
  111.         }
  112.         block = key.barrett.powMod(bi, key.d);
  113.         for (j = 0; j <= biHighIndex(block); ++j) {
  114.             result += String.fromCharCode(block.digits[j] & 255,
  115.                                                       block.digits[j] >> 8);
  116.         }
  117.     }
  118.     // Remove trailing null, if any.
  119.     if (result.charCodeAt(result.length - 1) == 0) {
  120.         result = result.substring(0, result.length - 1);
  121.     }
  122.     return result;
  123. }
  124. // BigInt, a suite of routines for performing multiple-precision arithmetic in
  125. // JavaScript.
  126. //
  127. // Copyright 1998-2005 David Shapiro.
  128. //
  129. // You may use, re-use, abuse,
  130. // copy, and modify this code to your liking, but please keep this header.
  131. // Thanks!
  132. //
  133. // Dave Shapiro
  134. // dave@ohdave.com

  135. // IMPORTANT THING: Be sure to set maxDigits according to your precision
  136. // needs. Use the setMaxDigits() function to do this. See comments below.
  137. //
  138. // Tweaked by Ian Bunning
  139. // Alterations:
  140. // Fix bug in function biFromHex(s) to allow
  141. // parsing of strings of length != 0 (mod 4)

  142. // Changes made by Dave Shapiro as of 12/30/2004:
  143. //
  144. // The BigInt() constructor doesn't take a string anymore. If you want to
  145. // create a BigInt from a string, use biFromDecimal() for base-10
  146. // representations, biFromHex() for base-16 representations, or
  147. // biFromString() for base-2-to-36 representations.
  148. //
  149. // biFromArray() has been removed. Use biCopy() instead, passing a BigInt
  150. // instead of an array.
  151. //
  152. // The BigInt() constructor now only constructs a zeroed-out array.
  153. // Alternatively, if you pass <true>, it won't construct any array. See the
  154. // biCopy() method for an example of this.
  155. //
  156. // Be sure to set maxDigits depending on your precision needs. The default
  157. // zeroed-out array ZERO_ARRAY is constructed inside the setMaxDigits()
  158. // function. So use this function to set the variable. DON'T JUST SET THE
  159. // VALUE. USE THE FUNCTION.
  160. //
  161. // ZERO_ARRAY exists to hopefully speed up construction of BigInts(). By
  162. // precalculating the zero array, we can just use slice(0) to make copies of
  163. // it. Presumably this calls faster native code, as opposed to setting the
  164. // elements one at a time. I have not done any timing tests to verify this
  165. // claim.

  166. // Max number = 10^16 - 2 = 9999999999999998;
  167. //               2^53     = 9007199254740992;

  168. var biRadixBase = 2;
  169. var biRadixBits = 16;
  170. var bitsPerDigit = biRadixBits;
  171. var biRadix = 1 << 16; // = 2^16 = 65536
  172. var biHalfRadix = biRadix >>> 1;
  173. var biRadixSquared = biRadix * biRadix;
  174. var maxDigitVal = biRadix - 1;
  175. var maxInteger = 9999999999999998;

  176. // maxDigits:
  177. // Change this to accommodate your largest number size. Use setMaxDigits()
  178. // to change it!
  179. //
  180. // In general, if you're working with numbers of size N bits, you'll need 2*N
  181. // bits of storage. Each digit holds 16 bits. So, a 1024-bit key will need
  182. //
  183. // 1024 * 2 / 16 = 128 digits of storage.
  184. //

  185. var maxDigits;
  186. var ZERO_ARRAY;
  187. var bigZero, bigOne;

  188. function setMaxDigits(value)
  189. {
  190.         maxDigits = value;
  191.         ZERO_ARRAY = new Array(maxDigits);
  192.         for (var iza = 0; iza < ZERO_ARRAY.length; iza++) ZERO_ARRAY[iza] = 0;
  193.         bigZero = new BigInt();
  194.         bigOne = new BigInt();
  195.         bigOne.digits[0] = 1;
  196. }

  197. setMaxDigits(20);

  198. // The maximum number of digits in base 10 you can convert to an
  199. // integer without JavaScript throwing up on you.
  200. var dpl10 = 15;
  201. // lr10 = 10 ^ dpl10
  202. var lr10 = biFromNumber(1000000000000000);

  203. function BigInt(flag)
  204. {
  205.         if (typeof flag == "boolean" && flag == true) {
  206.                 this.digits = null;
  207.         }
  208.         else {
  209.                 this.digits = ZERO_ARRAY.slice(0);
  210.         }
  211.         this.isNeg = false;
  212. }

  213. function biFromDecimal(s)
  214. {
  215.         var isNeg = s.charAt(0) == '-';
  216.         var i = isNeg ? 1 : 0;
  217.         var result;
  218.         // Skip leading zeros.
  219.         while (i < s.length && s.charAt(i) == '0') ++i;
  220.         if (i == s.length) {
  221.                 result = new BigInt();
  222.         }
  223.         else {
  224.                 var digitCount = s.length - i;
  225.                 var fgl = digitCount % dpl10;
  226.                 if (fgl == 0) fgl = dpl10;
  227.                 result = biFromNumber(Number(s.substr(i, fgl)));
  228.                 i += fgl;
  229.                 while (i < s.length) {
  230.                         result = biAdd(biMultiply(result, lr10),
  231.                                        biFromNumber(Number(s.substr(i, dpl10))));
  232.                         i += dpl10;
  233.                 }
  234.                 result.isNeg = isNeg;
  235.         }
  236.         return result;
  237. }

  238. function biCopy(bi)
  239. {
  240.         var result = new BigInt(true);
  241.         result.digits = bi.digits.slice(0);
  242.         result.isNeg = bi.isNeg;
  243.         return result;
  244. }

  245. function biFromNumber(i)
  246. {
  247.         var result = new BigInt();
  248.         result.isNeg = i < 0;
  249.         i = Math.abs(i);
  250.         var j = 0;
  251.         while (i > 0) {
  252.                 result.digits[j++] = i & maxDigitVal;
  253.                 i = Math.floor(i / biRadix);
  254.         }
  255.         return result;
  256. }

  257. function reverseStr(s)
  258. {
  259.         var result = "";
  260.         for (var i = s.length - 1; i > -1; --i) {
  261.                 result += s.charAt(i);
  262.         }
  263.         return result;
  264. }

  265. var hexatrigesimalToChar = new Array(
  266. '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
  267. 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
  268. 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
  269. 'u', 'v', 'w', 'x', 'y', 'z'
  270. );

  271. function biToString(x, radix)
  272.         // 2 <= radix <= 36
  273. {
  274.         var b = new BigInt();
  275.         b.digits[0] = radix;
  276.         var qr = biDivideModulo(x, b);
  277.         var result = hexatrigesimalToChar[qr[1].digits[0]];
  278.         while (biCompare(qr[0], bigZero) == 1) {
  279.                 qr = biDivideModulo(qr[0], b);
  280.                 digit = qr[1].digits[0];
  281.                 result += hexatrigesimalToChar[qr[1].digits[0]];
  282.         }
  283.         return (x.isNeg ? "-" : "") + reverseStr(result);
  284. }

  285. function biToDecimal(x)
  286. {
  287.         var b = new BigInt();
  288.         b.digits[0] = 10;
  289.         var qr = biDivideModulo(x, b);
  290.         var result = String(qr[1].digits[0]);
  291.         while (biCompare(qr[0], bigZero) == 1) {
  292.                 qr = biDivideModulo(qr[0], b);
  293.                 result += String(qr[1].digits[0]);
  294.         }
  295.         return (x.isNeg ? "-" : "") + reverseStr(result);
  296. }

  297. var hexToChar = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
  298.                           'a', 'b', 'c', 'd', 'e', 'f');

  299. function digitToHex(n)
  300. {
  301.         var mask = 0xf;
  302.         var result = "";
  303.         for (i = 0; i < 4; ++i) {
  304.                 result += hexToChar[n & mask];
  305.                 n >>>= 4;
  306.         }
  307.         return reverseStr(result);
  308. }

  309. function biToHex(x)
  310. {
  311.         var result = "";
  312.         var n = biHighIndex(x);
  313.         for (var i = biHighIndex(x); i > -1; --i) {
  314.                 result += digitToHex(x.digits[i]);
  315.         }
  316.         return result;
  317. }

  318. function charToHex(c)
  319. {
  320.         var ZERO = 48;
  321.         var NINE = ZERO + 9;
  322.         var littleA = 97;
  323.         var littleZ = littleA + 25;
  324.         var bigA = 65;
  325.         var bigZ = 65 + 25;
  326.         var result;

  327.         if (c >= ZERO && c <= NINE) {
  328.                 result = c - ZERO;
  329.         } else if (c >= bigA && c <= bigZ) {
  330.                 result = 10 + c - bigA;
  331.         } else if (c >= littleA && c <= littleZ) {
  332.                 result = 10 + c - littleA;
  333.         } else {
  334.                 result = 0;
  335.         }
  336.         return result;
  337. }

  338. function hexToDigit(s)
  339. {
  340.         var result = 0;
  341.         var sl = Math.min(s.length, 4);
  342.         for (var i = 0; i < sl; ++i) {
  343.                 result <<= 4;
  344.                 result |= charToHex(s.charCodeAt(i))
  345.         }
  346.         return result;
  347. }

  348. function biFromHex(s)
  349. {
  350.         var result = new BigInt();
  351.         var sl = s.length;
  352.         for (var i = sl, j = 0; i > 0; i -= 4, ++j) {
  353.                 result.digits[j] = hexToDigit(s.substr(Math.max(i - 4, 0), Math.min(i, 4)));
  354.         }
  355.         return result;
  356. }

  357. function biFromString(s, radix)
  358. {
  359.         var isNeg = s.charAt(0) == '-';
  360.         var istop = isNeg ? 1 : 0;
  361.         var result = new BigInt();
  362.         var place = new BigInt();
  363.         place.digits[0] = 1; // radix^0
  364.         for (var i = s.length - 1; i >= istop; i--) {
  365.                 var c = s.charCodeAt(i);
  366.                 var digit = charToHex(c);
  367.                 var biDigit = biMultiplyDigit(place, digit);
  368.                 result = biAdd(result, biDigit);
  369.                 place = biMultiplyDigit(place, radix);
  370.         }
  371.         result.isNeg = isNeg;
  372.         return result;
  373. }

  374. function biDump(b)
  375. {
  376.         return (b.isNeg ? "-" : "") + b.digits.join(" ");
  377. }

  378. function biAdd(x, y)
  379. {
  380.         var result;

  381.         if (x.isNeg != y.isNeg) {
  382.                 y.isNeg = !y.isNeg;
  383.                 result = biSubtract(x, y);
  384.                 y.isNeg = !y.isNeg;
  385.         }
  386.         else {
  387.                 result = new BigInt();
  388.                 var c = 0;
  389.                 var n;
  390.                 for (var i = 0; i < x.digits.length; ++i) {
  391.                         n = x.digits[i] + y.digits[i] + c;
  392.                         result.digits[i] = n % biRadix;
  393.                         c = Number(n >= biRadix);
  394.                 }
  395.                 result.isNeg = x.isNeg;
  396.         }
  397.         return result;
  398. }


  399. function biHighIndex(x)
  400. {
  401.         var result = x.digits.length - 1;
  402.         while (result > 0 && x.digits[result] == 0) --result;
  403.         return result;
  404. }

  405. function biNumBits(x)
  406. {
  407.         var n = biHighIndex(x);
  408.         var d = x.digits[n];
  409.         var m = (n + 1) * bitsPerDigit;
  410.         var result;
  411.         for (result = m; result > m - bitsPerDigit; --result) {
  412.                 if ((d & 0x8000) != 0) break;
  413.                 d <<= 1;
  414.         }
  415.         return result;
  416. }

  417. function biMultiply(x, y)
  418. {
  419.         var result = new BigInt();
  420.         var c;
  421.         var n = biHighIndex(x);
  422.         var t = biHighIndex(y);
  423.         var u, uv, k;

  424.         for (var i = 0; i <= t; ++i) {
  425.                 c = 0;
  426.                 k = i;
  427.                 for (j = 0; j <= n; ++j, ++k) {
  428.                         uv = result.digits[k] + x.digits[j] * y.digits[i] + c;
  429.                         result.digits[k] = uv & maxDigitVal;
  430.                         c = uv >>> biRadixBits;
  431.                         //c = Math.floor(uv / biRadix);
  432.                 }
  433.                 result.digits[i + n + 1] = c;
  434.         }
  435.         // Someone give me a logical xor, please.
  436.         result.isNeg = x.isNeg != y.isNeg;
  437.         return result;
  438. }

  439. function biMultiplyDigit(x, y)
  440. {
  441.         var n, c, uv;

  442.         result = new BigInt();
  443.         n = biHighIndex(x);
  444.         c = 0;
  445.         for (var j = 0; j <= n; ++j) {
  446.                 uv = result.digits[j] + x.digits[j] * y + c;
  447.                 result.digits[j] = uv & maxDigitVal;
  448.                 c = uv >>> biRadixBits;
  449.                 //c = Math.floor(uv / biRadix);
  450.         }
  451.         result.digits[1 + n] = c;
  452.         return result;
  453. }

  454. function arrayCopy(src, srcStart, dest, destStart, n)
  455. {
  456.         var m = Math.min(srcStart + n, src.length);
  457.         for (var i = srcStart, j = destStart; i < m; ++i, ++j) {
  458.                 dest[j] = src[i];
  459.         }
  460. }

  461. var highBitMasks = new Array(0x0000, 0x8000, 0xC000, 0xE000, 0xF000, 0xF800,
  462.                              0xFC00, 0xFE00, 0xFF00, 0xFF80, 0xFFC0, 0xFFE0,
  463.                              0xFFF0, 0xFFF8, 0xFFFC, 0xFFFE, 0xFFFF);

  464. function biShiftLeft(x, n)
  465. {
  466.         var digitCount = Math.floor(n / bitsPerDigit);
  467.         var result = new BigInt();
  468.         arrayCopy(x.digits, 0, result.digits, digitCount,
  469.                   result.digits.length - digitCount);
  470.         var bits = n % bitsPerDigit;
  471.         var rightBits = bitsPerDigit - bits;
  472.         for (var i = result.digits.length - 1, i1 = i - 1; i > 0; --i, --i1) {
  473.                 result.digits[i] = ((result.digits[i] << bits) & maxDigitVal) |
  474.                                    ((result.digits[i1] & highBitMasks[bits]) >>>
  475.                                     (rightBits));
  476.         }
  477.         result.digits[0] = ((result.digits[i] << bits) & maxDigitVal);
  478.         result.isNeg = x.isNeg;
  479.         return result;
  480. }

  481. var lowBitMasks = new Array(0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F,
  482.                             0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF,
  483.                             0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF);

  484. function biShiftRight(x, n)
  485. {
  486.         var digitCount = Math.floor(n / bitsPerDigit);
  487.         var result = new BigInt();
  488.         arrayCopy(x.digits, digitCount, result.digits, 0,
  489.                   x.digits.length - digitCount);
  490.         var bits = n % bitsPerDigit;
  491.         var leftBits = bitsPerDigit - bits;
  492.         for (var i = 0, i1 = i + 1; i < result.digits.length - 1; ++i, ++i1) {
  493.                 result.digits[i] = (result.digits[i] >>> bits) |
  494.                                    ((result.digits[i1] & lowBitMasks[bits]) << leftBits);
  495.         }
  496.         result.digits[result.digits.length - 1] >>>= bits;
  497.         result.isNeg = x.isNeg;
  498.         return result;
  499. }

  500. function biMultiplyByRadixPower(x, n)
  501. {
  502.         var result = new BigInt();
  503.         arrayCopy(x.digits, 0, result.digits, n, result.digits.length - n);
  504.         return result;
  505. }

  506. function biDivideByRadixPower(x, n)
  507. {
  508.         var result = new BigInt();
  509.         arrayCopy(x.digits, n, result.digits, 0, result.digits.length - n);
  510.         return result;
  511. }

  512. function biModuloByRadixPower(x, n)
  513. {
  514.         var result = new BigInt();
  515.         arrayCopy(x.digits, 0, result.digits, 0, n);
  516.         return result;
  517. }

  518. function biCompare(x, y)
  519. {
  520.         if (x.isNeg != y.isNeg) {
  521.                 return 1 - 2 * Number(x.isNeg);
  522.         }
  523.         for (var i = x.digits.length - 1; i >= 0; --i) {
  524.                 if (x.digits[i] != y.digits[i]) {
  525.                         if (x.isNeg) {
  526.                                 return 1 - 2 * Number(x.digits[i] > y.digits[i]);
  527.                         } else {
  528.                                 return 1 - 2 * Number(x.digits[i] < y.digits[i]);
  529.                         }
  530.                 }
  531.         }
  532.         return 0;
  533. }

  534. function biDivideModulo(x, y)
  535. {
  536.         var nb = biNumBits(x);
  537.         var tb = biNumBits(y);
  538.         var origYIsNeg = y.isNeg;
  539.         var q, r;
  540.         if (nb < tb) {
  541.                 // |x| < |y|
  542.                 if (x.isNeg) {
  543.                         q = biCopy(bigOne);
  544.                         q.isNeg = !y.isNeg;
  545.                         x.isNeg = false;
  546.                         y.isNeg = false;
  547.                         r = biSubtract(y, x);
  548.                         // Restore signs, 'cause they're references.
  549.                         x.isNeg = true;
  550.                         y.isNeg = origYIsNeg;
  551.                 } else {
  552.                         q = new BigInt();
  553.                         r = biCopy(x);
  554.                 }
  555.                 return new Array(q, r);
  556.         }

  557.         q = new BigInt();
  558.         r = x;

  559.         // Normalize Y.
  560.         var t = Math.ceil(tb / bitsPerDigit) - 1;
  561.         var lambda = 0;
  562.         while (y.digits[t] < biHalfRadix) {
  563.                 y = biShiftLeft(y, 1);
  564.                 ++lambda;
  565.                 ++tb;
  566.                 t = Math.ceil(tb / bitsPerDigit) - 1;
  567.         }
  568.         // Shift r over to keep the quotient constant. We'll shift the
  569.         // remainder back at the end.
  570.         r = biShiftLeft(r, lambda);
  571.         nb += lambda; // Update the bit count for x.
  572.         var n = Math.ceil(nb / bitsPerDigit) - 1;

  573.         var b = biMultiplyByRadixPower(y, n - t);
  574.         while (biCompare(r, b) != -1) {
  575.                 ++q.digits[n - t];
  576.                 r = biSubtract(r, b);
  577.         }
  578.         for (var i = n; i > t; --i) {
  579.     var ri = (i >= r.digits.length) ? 0 : r.digits[i];
  580.     var ri1 = (i - 1 >= r.digits.length) ? 0 : r.digits[i - 1];
  581.     var ri2 = (i - 2 >= r.digits.length) ? 0 : r.digits[i - 2];
  582.     var yt = (t >= y.digits.length) ? 0 : y.digits[t];
  583.     var yt1 = (t - 1 >= y.digits.length) ? 0 : y.digits[t - 1];
  584.                 if (ri == yt) {
  585.                         q.digits[i - t - 1] = maxDigitVal;
  586.                 } else {
  587.                         q.digits[i - t - 1] = Math.floor((ri * biRadix + ri1) / yt);
  588.                 }

  589.                 var c1 = q.digits[i - t - 1] * ((yt * biRadix) + yt1);
  590.                 var c2 = (ri * biRadixSquared) + ((ri1 * biRadix) + ri2);
  591.                 while (c1 > c2) {
  592.                         --q.digits[i - t - 1];
  593.                         c1 = q.digits[i - t - 1] * ((yt * biRadix) | yt1);
  594.                         c2 = (ri * biRadix * biRadix) + ((ri1 * biRadix) + ri2);
  595.                 }

  596.                 b = biMultiplyByRadixPower(y, i - t - 1);
  597.                 r = biSubtract(r, biMultiplyDigit(b, q.digits[i - t - 1]));
  598.                 if (r.isNeg) {
  599.                         r = biAdd(r, b);
  600.                         --q.digits[i - t - 1];
  601.                 }
  602.         }
  603.         r = biShiftRight(r, lambda);
  604.         // Fiddle with the signs and stuff to make sure that 0 <= r < y.
  605.         q.isNeg = x.isNeg != origYIsNeg;
  606.         if (x.isNeg) {
  607.                 if (origYIsNeg) {
  608.                         q = biAdd(q, bigOne);
  609.                 } else {
  610.                         q = biSubtract(q, bigOne);
  611.                 }
  612.                 y = biShiftRight(y, lambda);
  613.                 r = biSubtract(y, r);
  614.         }
  615.         // Check for the unbelievably stupid degenerate case of r == -0.
  616.         if (r.digits[0] == 0 && biHighIndex(r) == 0) r.isNeg = false;

  617.         return new Array(q, r);
  618. }

  619. function biDivideModulo(x, y)
  620. {
  621.         var nb = biNumBits(x);
  622.         var tb = biNumBits(y);
  623.         var origYIsNeg = y.isNeg;
  624.         var q, r;
  625.         if (nb < tb) {
  626.                 // |x| < |y|
  627.                 if (x.isNeg) {
  628.                         q = biCopy(bigOne);
  629.                         q.isNeg = !y.isNeg;
  630.                         x.isNeg = false;
  631.                         y.isNeg = false;
  632.                         r = biSubtract(y, x);
  633.                         // Restore signs, 'cause they're references.
  634.                         x.isNeg = true;
  635.                         y.isNeg = origYIsNeg;
  636.                 } else {
  637.                         q = new BigInt();
  638.                         r = biCopy(x);
  639.                 }
  640.                 return new Array(q, r);
  641.         }

  642.         q = new BigInt();
  643.         r = x;

  644.         // Normalize Y.
  645.         var t = Math.ceil(tb / bitsPerDigit) - 1;
  646.         var lambda = 0;
  647.         while (y.digits[t] < biHalfRadix) {
  648.                 y = biShiftLeft(y, 1);
  649.                 ++lambda;
  650.                 ++tb;
  651.                 t = Math.ceil(tb / bitsPerDigit) - 1;
  652.         }
  653.         // Shift r over to keep the quotient constant. We'll shift the
  654.         // remainder back at the end.
  655.         r = biShiftLeft(r, lambda);
  656.         nb += lambda; // Update the bit count for x.
  657.         var n = Math.ceil(nb / bitsPerDigit) - 1;

  658.         var b = biMultiplyByRadixPower(y, n - t);
  659.         while (biCompare(r, b) != -1) {
  660.                 ++q.digits[n - t];
  661.                 r = biSubtract(r, b);
  662.         }
  663.         for (var i = n; i > t; --i) {
  664.     var ri = (i >= r.digits.length) ? 0 : r.digits[i];
  665.     var ri1 = (i - 1 >= r.digits.length) ? 0 : r.digits[i - 1];
  666.     var ri2 = (i - 2 >= r.digits.length) ? 0 : r.digits[i - 2];
  667.     var yt = (t >= y.digits.length) ? 0 : y.digits[t];
  668.     var yt1 = (t - 1 >= y.digits.length) ? 0 : y.digits[t - 1];
  669.                 if (ri == yt) {
  670.                         q.digits[i - t - 1] = maxDigitVal;
  671.                 } else {
  672.                         q.digits[i - t - 1] = Math.floor((ri * biRadix + ri1) / yt);
  673.                 }

  674.                 var c1 = q.digits[i - t - 1] * ((yt * biRadix) + yt1);
  675.                 var c2 = (ri * biRadixSquared) + ((ri1 * biRadix) + ri2);
  676.                 while (c1 > c2) {
  677.                         --q.digits[i - t - 1];
  678.                         c1 = q.digits[i - t - 1] * ((yt * biRadix) | yt1);
  679.                         c2 = (ri * biRadix * biRadix) + ((ri1 * biRadix) + ri2);
  680.                 }

  681.                 b = biMultiplyByRadixPower(y, i - t - 1);
  682.                 r = biSubtract(r, biMultiplyDigit(b, q.digits[i - t - 1]));
  683.                 if (r.isNeg) {
  684.                         r = biAdd(r, b);
  685.                         --q.digits[i - t - 1];
  686.                 }
  687.         }
  688.         r = biShiftRight(r, lambda);
  689.         // Fiddle with the signs and stuff to make sure that 0 <= r < y.
  690.         q.isNeg = x.isNeg != origYIsNeg;
  691.         if (x.isNeg) {
  692.                 if (origYIsNeg) {
  693.                         q = biAdd(q, bigOne);
  694.                 } else {
  695.                         q = biSubtract(q, bigOne);
  696.                 }
  697.                 y = biShiftRight(y, lambda);
  698.                 r = biSubtract(y, r);
  699.         }
  700.         // Check for the unbelievably stupid degenerate case of r == -0.
  701.         if (r.digits[0] == 0 && biHighIndex(r) == 0) r.isNeg = false;

  702.         return new Array(q, r);
  703. }

  704. function biDivide(x, y)
  705. {
  706.         return biDivideModulo(x, y)[0];
  707. }

  708. function biModulo(x, y)
  709. {
  710.         return biDivideModulo(x, y)[1];
  711. }

  712. function biMultiplyMod(x, y, m)
  713. {
  714.         return biModulo(biMultiply(x, y), m);
  715. }

  716. function biPow(x, y)
  717. {
  718.         var result = bigOne;
  719.         var a = x;
  720.         while (true) {
  721.                 if ((y & 1) != 0) result = biMultiply(result, a);
  722.                 y >>= 1;
  723.                 if (y == 0) break;
  724.                 a = biMultiply(a, a);
  725.         }
  726.         return result;
  727. }

  728. function biPowMod(x, y, m)
  729. {
  730.         var result = bigOne;
  731.         var a = x;
  732.         var k = y;
  733.         while (true) {
  734.                 if ((k.digits[0] & 1) != 0) result = biMultiplyMod(result, a, m);
  735.                 k = biShiftRight(k, 1);
  736.                 if (k.digits[0] == 0 && biHighIndex(k) == 0) break;
  737.                 a = biMultiplyMod(a, a, m);
  738.         }
  739.         return result;
  740. }

  741. // BarrettMu, a class for performing Barrett modular reduction computations in
  742. // JavaScript.
  743. //
  744. // Requires BigInt.js.
  745. //
  746. // Copyright 2004-2005 David Shapiro.
  747. //
  748. // You may use, re-use, abuse, copy, and modify this code to your liking, but
  749. // please keep this header.
  750. //
  751. // Thanks!
  752. //
  753. // Dave Shapiro
  754. // dave@ohdave.com

  755. function BarrettMu(m)
  756. {
  757.         this.modulus = biCopy(m);
  758.         this.k = biHighIndex(this.modulus) + 1;
  759.         var b2k = new BigInt();
  760.         b2k.digits[2 * this.k] = 1; // b2k = b^(2k)
  761.         this.mu = biDivide(b2k, this.modulus);
  762.         this.bkplus1 = new BigInt();
  763.         this.bkplus1.digits[this.k + 1] = 1; // bkplus1 = b^(k+1)
  764.         this.modulo = BarrettMu_modulo;
  765.         this.multiplyMod = BarrettMu_multiplyMod;
  766.         this.powMod = BarrettMu_powMod;
  767. }

  768. function BarrettMu_modulo(x)
  769. {
  770.         var q1 = biDivideByRadixPower(x, this.k - 1);
  771.         var q2 = biMultiply(q1, this.mu);
  772.         var q3 = biDivideByRadixPower(q2, this.k + 1);
  773.         var r1 = biModuloByRadixPower(x, this.k + 1);
  774.         var r2term = biMultiply(q3, this.modulus);
  775.         var r2 = biModuloByRadixPower(r2term, this.k + 1);
  776.         var r = biSubtract(r1, r2);
  777.         if (r.isNeg) {
  778.                 r = biAdd(r, this.bkplus1);
  779.         }
  780.         var rgtem = biCompare(r, this.modulus) >= 0;
  781.         while (rgtem) {
  782.                 r = biSubtract(r, this.modulus);
  783.                 rgtem = biCompare(r, this.modulus) >= 0;
  784.         }
  785.         return r;
  786. }

  787. function BarrettMu_multiplyMod(x, y)
  788. {
  789.         /*
  790.         x = this.modulo(x);
  791.         y = this.modulo(y);
  792.         */
  793.         var xy = biMultiply(x, y);
  794.         return this.modulo(xy);
  795. }

  796. function BarrettMu_powMod(x, y)
  797. {
  798.         var result = new BigInt();
  799.         result.digits[0] = 1;
  800.         var a = x;
  801.         var k = y;
  802.         while (true) {
  803.                 if ((k.digits[0] & 1) != 0) result = this.multiplyMod(result, a);
  804.                 k = biShiftRight(k, 1);
  805.                 if (k.digits[0] == 0 && biHighIndex(k) == 0) break;
  806.                 a = this.multiplyMod(a, a);
  807.         }
  808.         return result;
  809. }

  810. function biSubtract(x, y)
  811. {
  812.         var result;
  813.         if (x.isNeg != y.isNeg) {
  814.                 y.isNeg = !y.isNeg;
  815.                 result = biAdd(x, y);
  816.                 y.isNeg = !y.isNeg;
  817.         } else {
  818.                 result = new BigInt();
  819.                 var n, c;
  820.                 c = 0;
  821.                 for (var i = 0; i < x.digits.length; ++i) {
  822.                         n = x.digits[i] - y.digits[i] + c;
  823.                         result.digits[i] = n % biRadix;
  824.                         // Stupid non-conforming modulus operation.
  825.                         if (result.digits[i] < 0) result.digits[i] += biRadix;
  826.                         c = 0 - Number(n < 0);
  827.                 }
  828.                 // Fix up the negative sign, if any.
  829.                 if (c == -1) {
  830.                         c = 0;
  831.                         for (var i = 0; i < x.digits.length; ++i) {
  832.                                 n = 0 - result.digits[i] + c;
  833.                                 result.digits[i] = n % biRadix;
  834.                                 // Stupid non-conforming modulus operation.
  835.                                 if (result.digits[i] < 0) result.digits[i] += biRadix;
  836.                                 c = 0 - Number(n < 0);
  837.                         }
  838.                         // Result is opposite sign of arguments.
  839.                         result.isNeg = !x.isNeg;
  840.                 } else {
  841.                         // Result is same sign.
  842.                         result.isNeg = x.isNeg;
  843.                 }
  844.         }
  845.         return result;
  846. }
复制代码


最佳答案

查看完整内容

看图插入句十六进制位数代码即可解决你的问题了 setMaxDigits(130);

回答提醒:如果本帖被关闭无法回复,您有更好的答案帮助楼主解决,请发表至 源码区 可获得加分喔。
友情提醒:本版被采纳的主题可在 申请荣誉值 页面申请荣誉值,获得 1点 荣誉值,荣誉值可兑换荣誉会员、终身vip用户组。
快捷通道:申请荣誉值无答案申请取消悬赏投诉有答案未采纳为最佳
发表于 2018-12-19 22:27:59 | 显示全部楼层   广东省深圳市
看图插入句十六进制位数代码即可解决你的问题了
setMaxDigits(130);



评分

参与人数 1荣誉 +1 收起 理由
笨潴 + 1 热心帮助他人,荣誉+1,希望继续努力(*^__^*) 嘻嘻!

查看全部评分

回复

使用道具 举报

结帖率:100% (7/7)
发表于 2018-12-19 22:55:10 | 显示全部楼层   山东省烟台市
秘钥长会卡死????
回复

使用道具 举报

结帖率:100% (7/7)
发表于 2018-12-19 22:58:03 | 显示全部楼层   山东省烟台市
你这个秘钥 你确定正确吗??
回复

使用道具 举报

头像被屏蔽
结帖率:100% (15/15)
发表于 2018-12-19 23:17:06 | 显示全部楼层   辽宁省阜新市
  
var dbits, canary = 244837814094590,
j_lm = 15715070 == (canary & 16777215);
navigator = {};
window = this;
function BigInteger (b, a, c) {
null != b && ("number" == typeof b ? this.fromNumber (b, a, c) : null == a && "string" != typeof b ? this.fromString (b, 256) : this.fromString (b, a))
}
function nbi () {
return new BigInteger (null)
}
function am1 (b, a, c, d, e, f) {
for (; 0 <= --f;) {
var g = a * this[b++] + c[d] + e,
e = Math.floor (g / 67108864);
c[d++] = g & 67108863
}
return e
}
function am2 (b, a, c, d, e, f) {
for (var g = a & 32767, a = a >> 15; 0 <= --f;) {
var h = this[b] & 32767,
i = this[b++] >> 15,
k = a * h + i * g,
h = g * h + ( (k & 32767) << 15) + c[d] + (e & 1073741823),
e = (h >>> 30) + (k >>> 15) + a * i + (e >>> 30);
c[d++] = h & 1073741823
}
return e
}
function am3 (b, a, c, d, e, f) {
for (var g = a & 16383, a = a >> 14; 0 <= --f;) {
var h = this[b] & 16383,
i = this[b++] >> 14,
k = a * h + i * g,
h = g * h + ( (k & 16383) << 14) + c[d] + e,
e = (h >> 28) + (k >> 14) + a * i;
c[d++] = h & 268435455
}
return e
}
j_lm && "Microsoft Internet Explorer" == navigator.appName ? (BigInteger.prototype.am = am2,
dbits = 30) : j_lm && "Netscape" != navigator.appName ? (BigInteger.prototype.am = am1,
dbits = 26) : (BigInteger.prototype.am = am3,
dbits = 28);
BigInteger.prototype.DB = dbits;
BigInteger.prototype.DM = (1 << dbits) - 1;
BigInteger.prototype.DV = 1 << dbits;
var BI_FP = 52;
BigInteger.prototype.FV = Math.pow (2, BI_FP);
BigInteger.prototype.F1 = BI_FP - dbits;
BigInteger.prototype.F2 = 2 * dbits - BI_FP;
var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz",
BI_RC = [],
rr, vv;
rr = 48;
for (vv = 0; 9 >= vv; ++vv)
BI_RC[rr++] = vv;
rr = 97;
for (vv = 10; 36 > vv; ++vv)
BI_RC[rr++] = vv;
rr = 65;
for (vv = 10; 36 > vv; ++vv)
BI_RC[rr++] = vv;
function int2char (b) {
return BI_RM.charAt (b)
}
function intAt (b, a) {
var c = BI_RC[b.charCodeAt (a)];
return null == c ? -1 : c
}
function bnpCopyTo (b) {
for (var a = this.t - 1; 0 <= a; --a)
b[a] = this[a];
b.t = this.t;
b.s = this.s
}
function bnpFromInt (b) {
this.t = 1;
this.s = 0 > b ? -1 : 0;
0 < b ? this[0] = b : -1 > b ? this[0] = b + this.DV : this.t = 0
}
function nbv (b) {
var a = nbi ();
a.fromInt (b);
return a
}
function bnpFromString (b, a) {
var c;
if (16 == a) c = 4;
else if (8 == a) c = 3;
else if (256 == a) c = 8;
else if (2 == a) c = 1;
else if (32 == a) c = 5;
else if (4 == a) c = 2;
else {
this.fromRadix (b, a);
return
}
this.s = this.t = 0;
for (var d = b.length, e = !1, f = 0; 0 <= --d;) {
var g = 8 == c ? b[d] & 255 : intAt (b, d);
0 > g ? "-" == b.charAt (d) && (e = !0) : (e = !1,
0 == f ? this[this.t++] = g : f + c > this.DB ? (this[this.t - 1] |= (g & (1 << this.DB - f) - 1) << f,
this[this.t++] = g >> this.DB - f) : this[this.t - 1] |= g << f,
f += c,
f >= this.DB && (f -= this.DB))
}
if (8 == c && 0 != (b[0] & 128)) this.s = -1,
0 < f && (this[this.t - 1] |= (1 << this.DB - f) - 1 << f);
this.clamp ();
e && BigInteger.ZERO.subTo (this, this)
}
function bnpClamp () {
for (var b = this.s & this.DM; 0 < this.t && this[this.t - 1] == b;)--this.t
}
function bnToString (b) {
if (0 > this.s) return "-" + this.negate ().toString (b);
if (16 == b) b = 4;
else if (8 == b) b = 3;
else if (2 == b) b = 1;
else if (32 == b) b = 5;
else if (4 == b) b = 2;
else return this.toRadix (b);
var a = (1 << b) - 1,
c, d = !1,
e = "",
f = this.t,
g = this.DB - f * this.DB % b;
if (0 < f--) {
if (g < this.DB && 0 < (c = this[f] >> g)) d = !0,
e = int2char (c);
for (; 0 <= f;)
g < b ? (c = (this[f] & (1 << g) - 1) << b - g,
c |= this[--f] >> (g += this.DB - b)) : (c = this[f] >> (g -= b) & a,
0 >= g && (g += this.DB, --f)),
0 < c && (d = !0),
d && (e += int2char (c))
}
return d ? e : "0"
}
function bnNegate () {
var b = nbi ();
BigInteger.ZERO.subTo (this, b);
return b
}
function bnAbs () {
return 0 > this.s ? this.negate () : this
}
function bnCompareTo (b) {
var a = this.s - b.s;
if (0 != a) return a;
var c = this.t,
a = c - b.t;
if (0 != a) return 0 > this.s ? -a : a;
for (; 0 <= --c;)
if (0 != (a = this[c] - b[c])) return a;
return 0
}
function nbits (b) {
var a = 1,
c;
if (0 != (c = b >>> 16)) b = c,
a += 16;
if (0 != (c = b >> 8)) b = c,
a += 8;
if (0 != (c = b >> 4)) b = c,
a += 4;
if (0 != (c = b >> 2)) b = c,
a += 2;
0 != b >> 1 && (a += 1);
return a
}
function bnBitLength () {
return 0 >= this.t ? 0 : this.DB * (this.t - 1) + nbits (this[this.t - 1] ^ this.s & this.DM)
}
function bnpDLShiftTo (b, a) {
var c;
for (c = this.t - 1; 0 <= c; --c)
a[c + b] = this[c];
for (c = b - 1; 0 <= c; --c)
a[c] = 0;
a.t = this.t + b;
a.s = this.s
}
function bnpDRShiftTo (b, a) {
for (var c = b; c < this.t; ++c)
a[c - b] = this[c];
a.t = Math.max (this.t - b, 0);
a.s = this.s
}
function bnpLShiftTo (b, a) {
var c = b % this.DB,
d = this.DB - c,
e = (1 << d) - 1,
f = Math.floor (b / this.DB),
g = this.s << c & this.DM,
h;
for (h = this.t - 1; 0 <= h; --h)
a[h + f + 1] = this[h] >> d | g,
g = (this[h] & e) << c;
for (h = f - 1; 0 <= h; --h)
a[h] = 0;
a[f] = g;
a.t = this.t + f + 1;
a.s = this.s;
a.clamp ()
}
function bnpRShiftTo (b, a) {
a.s = this.s;
var c = Math.floor (b / this.DB);
if (c >= this.t) a.t = 0;
else {
var d = b % this.DB,
e = this.DB - d,
f = (1 << d) - 1;
a[0] = this[c] >> d;
for (var g = c + 1; g < this.t; ++g)
a[g - c - 1] |= (this[g] & f) << e,
a[g - c] = this[g] >> d;
0 < d && (a[this.t - c - 1] |= (this.s & f) << e);
a.t = this.t - c;
a.clamp ()
}
}
function bnpSubTo (b, a) {
for (var c = 0, d = 0, e = Math.min (b.t, this.t); c < e;)
d += this[c] - b[c],
a[c++] = d & this.DM,
d >>= this.DB;
if (b.t < this.t) {
for (d -= b.s; c < this.t;)
d += this[c],
a[c++] = d & this.DM,
d >>= this.DB;
d += this.s
} else {
for (d += this.s; c < b.t;)
d -= b[c],
a[c++] = d & this.DM,
d >>= this.DB;
d -= b.s
}
a.s = 0 > d ? -1 : 0; - 1 > d ? a[c++] = this.DV + d : 0 < d && (a[c++] = d);
a.t = c;
a.clamp ()
}
function bnpMultiplyTo (b, a) {
var c = this.abs (),
d = b.abs (),
e = c.t;
for (a.t = e + d.t; 0 <= --e;)
a[e] = 0;
for (e = 0; e < d.t; ++e)
a[e + c.t] = c.am (0, d[e], a, e, 0, c.t);
a.s = 0;
a.clamp ();
this.s != b.s && BigInteger.ZERO.subTo (a, a)
}
function bnpSquareTo (b) {
for (var a = this.abs (), c = b.t = 2 * a.t; 0 <= --c;)
b[c] = 0;
for (c = 0; c < a.t - 1; ++c) {
var d = a.am (c, a[c], b, 2 * c, 0, 1);
if ( (b[c + a.t] += a.am (c + 1, 2 * a[c], b, 2 * c + 1, d, a.t - c - 1)) >= a.DV) b[c + a.t] -= a.DV,
b[c + a.t + 1] = 1
}
0 < b.t && (b[b.t - 1] += a.am (c, a[c], b, 2 * c, 0, 1));
b.s = 0;
b.clamp ()
}
function bnpDivRemTo (b, a, c) {
var d = b.abs ();
if (! (0 >= d.t)) {
var e = this.abs ();
if (e.t < d.t) null != a && a.fromInt (0),
null != c && this.copyTo (c);
else {
null == c && (c = nbi ());
var f = nbi (),
g = this.s,
b = b.s,
h = this.DB - nbits (d[d.t - 1]);
0 < h ? (d.lShiftTo (h, f),
e.lShiftTo (h, c)) : (d.copyTo (f),
e.copyTo (c));
d = f.t;
e = f[d - 1];
if (0 != e) {
var i = e * (1 << this.F1) + (1 < d ? f[d - 2] >> this.F2 : 0),
k = this.FV / i,
i = (1 << this.F1) / i,
o = 1 << this.F2,
l = c.t,
m = l - d,
j = null == a ? nbi () : a;
f.dlShiftTo (m, j);
0 <= c.compareTo (j) && (c[c.t++] = 1,
c.subTo (j, c));
BigInteger.ONE.dlShiftTo (d, j);
for (j.subTo (f, f); f.t < d;)
f[f.t++] = 0;
for (; 0 <= --m;) {
var n = c[--l] == e ? this.DM : Math.floor (c[l] * k + (c[l - 1] + o) * i);
if ( (c[l] += f.am (0, n, c, m, 0, d)) < n) {
f.dlShiftTo (m, j);
for (c.subTo (j, c); c[l] < --n;)
c.subTo (j, c)
}
}
null != a && (c.drShiftTo (d, a),
g != b && BigInteger.ZERO.subTo (a, a));
c.t = d;
c.clamp ();
0 < h && c.rShiftTo (h, c);
0 > g && BigInteger.ZERO.subTo (c, c)
}
}
}
}
function bnMod (b) {
var a = nbi ();
this.abs ().divRemTo (b, null, a);
0 > this.s && 0 < a.compareTo (BigInteger.ZERO) && b.subTo (a, a);
return a
}
function Classic (b) {
this.m = b
}
function cConvert (b) {
return 0 > b.s || 0 <= b.compareTo (this.m) ? b.mod (this.m) : b
}
function cRevert (b) {
return b
}
function cReduce (b) {
b.divRemTo (this.m, null, b)
}
function cMulTo (b, a, c) {
b.multiplyTo (a, c);
this.reduce (c)
}
function cSqrTo (b, a) {
b.squareTo (a);
this.reduce (a)
}
Classic.prototype.convert = cConvert;
Classic.prototype.revert = cRevert;
Classic.prototype.reduce = cReduce;
Classic.prototype.mulTo = cMulTo;
Classic.prototype.sqrTo = cSqrTo;
function bnpInvDigit () {
if (1 > this.t) return 0;
var b = this[0];
if (0 == (b & 1)) return 0;
var a = b & 3,
a = a * (2 - (b & 15) * a) & 15,
a = a * (2 - (b & 255) * a) & 255,
a = a * (2 - ( (b & 65535) * a & 65535)) & 65535,
a = a * (2 - b * a % this.DV) % this.DV;
return 0 < a ? this.DV - a : -a
}
function Montgomery (b) {
this.m = b;
this.mp = b.invDigit ();
this.mpl = this.mp & 32767;
this.mph = this.mp >> 15;
this.um = (1 << b.DB - 15) - 1;
this.mt2 = 2 * b.t
}
function montConvert (b) {
var a = nbi ();
b.abs ().dlShiftTo (this.m.t, a);
a.divRemTo (this.m, null, a);
0 > b.s && 0 < a.compareTo (BigInteger.ZERO) && this.m.subTo (a, a);
return a
}
function montRevert (b) {
var a = nbi ();
b.copyTo (a);
this.reduce (a);
return a
}
function montReduce (b) {
for (; b.t <= this.mt2;)
b[b.t++] = 0;
for (var a = 0; a < this.m.t; ++a) {
var c = b[a] & 32767,
d = c * this.mpl + ( (c * this.mph + (b[a] >> 15) * this.mpl & this.um) << 15) & b.DM,
c = a + this.m.t;
for (b[c] += this.m.am (0, d, b, a, 0, this.m.t); b[c] >= b.DV;)
b[c] -= b.DV,
b[++c]++
}
b.clamp ();
b.drShiftTo (this.m.t, b);
0 <= b.compareTo (this.m) && b.subTo (this.m, b)
}
function montSqrTo (b, a) {
b.squareTo (a);
this.reduce (a)
}
function montMulTo (b, a, c) {
b.multiplyTo (a, c);
this.reduce (c)
}
Montgomery.prototype.convert = montConvert;
Montgomery.prototype.revert = montRevert;
Montgomery.prototype.reduce = montReduce;
Montgomery.prototype.mulTo = montMulTo;
Montgomery.prototype.sqrTo = montSqrTo;
function bnpIsEven () {
return 0 == (0 < this.t ? this[0] & 1 : this.s)
}
function bnpExp (b, a) {
if (4294967295 < b || 1 > b) return BigInteger.ONE;
var c = nbi (),
d = nbi (),
e = a.convert (this),
f = nbits (b) - 1;
for (e.copyTo (c); 0 <=

回复

使用道具 举报

头像被屏蔽
结帖率:100% (15/15)
发表于 2018-12-19 23:18:17 | 显示全部楼层   辽宁省阜新市
自己不会就不要误导大家,你都吧我给绕进去了,你的js有问题,你抓的不对;getPwd(pwd)
1.txt (21.13 KB, 下载次数: 2)

点评

因为你说的卡死,害的我研究半天。。。   辽宁省阜新市  发表于 2018-12-19 23:18

评分

参与人数 1好评 +1 精币 +1 收起 理由
iamafailor + 1 + 1 我没有误导别人,你这个给我改了函数 不是我要的了 还是谢谢你

查看全部评分

回复

使用道具 举报

结帖率:95% (19/20)

签到天数: 18 天

 楼主| 发表于 2018-12-20 08:47:00 | 显示全部楼层   上海市上海市
峰生水起之林 发表于 2018-12-19 23:59
看图插入句十六进制位数代码即可解决你的问题了
setMaxDigits(130);

对了老哥 可以了

请问一下原因好嘛?

能解释一下吗?  

最佳已经妥妥是你的了
回复

使用道具 举报

结帖率:0% (0/1)
发表于 2018-12-20 09:41:06 | 显示全部楼层   广西壮族自治区贺州市
楼主这刷屏神器
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 致发广告者

发布主题 收藏帖子 返回列表

sitemap| 易语言源码| 易语言教程| 易语言论坛| 诚聘英才| 易语言模块| 手机版| 广告投放| 精易论坛
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
论坛帖子内容仅用于技术交流学习和研究的目的,严禁用于非法目的,否则造成一切后果自负!如帖子内容侵害到你的权益,请联系我们!
防范网络诈骗,远离网络犯罪 违法和不良信息举报电话0663-3422125,QQ: 800073686,邮箱:800073686@b.qq.com
Powered by Discuz! X3.4 揭阳市揭东区精易科技有限公司 ( 粤ICP备12094385号-1) 粤公网安备 44522102000125 增值电信业务经营许可证 粤B2-20192173

快速回复 返回顶部 返回列表