diff --git a/.gitignore b/.gitignore
new file mode 100755
index 0000000..5f24e76
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+.idea
+composer.lock
+*.log
+thinkphp
\ No newline at end of file
diff --git a/101_188.swf b/101_188.swf
new file mode 100644
index 0000000..bab213e
Binary files /dev/null and b/101_188.swf differ
diff --git a/2_Flat_logo_on_transparent.png b/2_Flat_logo_on_transparent.png
new file mode 100644
index 0000000..bda4b8e
Binary files /dev/null and b/2_Flat_logo_on_transparent.png differ
diff --git a/README.md b/README.md
new file mode 100755
index 0000000..000297c
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+# 测试项目,比较乱
\ No newline at end of file
diff --git a/ajax_test.html b/ajax_test.html
new file mode 100644
index 0000000..06a6c61
--- /dev/null
+++ b/ajax_test.html
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+ TODO supply a title
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/code.php b/code.php
new file mode 100644
index 0000000..91af63c
--- /dev/null
+++ b/code.php
@@ -0,0 +1,62 @@
+
\ No newline at end of file
diff --git a/favicon.ico b/favicon.ico
new file mode 100644
index 0000000..23973ee
Binary files /dev/null and b/favicon.ico differ
diff --git a/java-rsa/Barrett.js b/java-rsa/Barrett.js
new file mode 100644
index 0000000..8f05d58
--- /dev/null
+++ b/java-rsa/Barrett.js
@@ -0,0 +1,74 @@
+// BarrettMu, a class for performing Barrett modular reduction computations in
+// JavaScript.
+//
+// Requires BigInt.js.
+//
+// Copyright 2004-2005 David Shapiro.
+//
+// You may use, re-use, abuse, copy, and modify this code to your liking, but
+// please keep this header.
+//
+// Thanks!
+//
+// Dave Shapiro
+// dave@ohdave.com
+
+function BarrettMu(m)
+{
+ this.modulus = biCopy(m);
+ this.k = biHighIndex(this.modulus) + 1;
+ var b2k = new BigInt();
+ b2k.digits[2 * this.k] = 1; // b2k = b^(2k)
+ this.mu = biDivide(b2k, this.modulus);
+ this.bkplus1 = new BigInt();
+ this.bkplus1.digits[this.k + 1] = 1; // bkplus1 = b^(k+1)
+ this.modulo = BarrettMu_modulo;
+ this.multiplyMod = BarrettMu_multiplyMod;
+ this.powMod = BarrettMu_powMod;
+}
+
+function BarrettMu_modulo(x)
+{
+ var q1 = biDivideByRadixPower(x, this.k - 1);
+ var q2 = biMultiply(q1, this.mu);
+ var q3 = biDivideByRadixPower(q2, this.k + 1);
+ var r1 = biModuloByRadixPower(x, this.k + 1);
+ var r2term = biMultiply(q3, this.modulus);
+ var r2 = biModuloByRadixPower(r2term, this.k + 1);
+ var r = biSubtract(r1, r2);
+ if (r.isNeg) {
+ r = biAdd(r, this.bkplus1);
+ }
+ var rgtem = biCompare(r, this.modulus) >= 0;
+ while (rgtem) {
+ r = biSubtract(r, this.modulus);
+ rgtem = biCompare(r, this.modulus) >= 0;
+ }
+ return r;
+}
+
+function BarrettMu_multiplyMod(x, y)
+{
+ /*
+ x = this.modulo(x);
+ y = this.modulo(y);
+ */
+ var xy = biMultiply(x, y);
+ return this.modulo(xy);
+}
+
+function BarrettMu_powMod(x, y)
+{
+ var result = new BigInt();
+ result.digits[0] = 1;
+ var a = x;
+ var k = y;
+ while (true) {
+ if ((k.digits[0] & 1) != 0) result = this.multiplyMod(result, a);
+ k = biShiftRight(k, 1);
+ if (k.digits[0] == 0 && biHighIndex(k) == 0) break;
+ a = this.multiplyMod(a, a);
+ }
+ return result;
+}
+
diff --git a/java-rsa/BigInt.js b/java-rsa/BigInt.js
new file mode 100644
index 0000000..f669ed6
--- /dev/null
+++ b/java-rsa/BigInt.js
@@ -0,0 +1,626 @@
+// BigInt, a suite of routines for performing multiple-precision arithmetic in
+// JavaScript.
+//
+// Copyright 1998-2005 David Shapiro.
+//
+// You may use, re-use, abuse,
+// copy, and modify this code to your liking, but please keep this header.
+// Thanks!
+//
+// Dave Shapiro
+// dave@ohdave.com
+
+// IMPORTANT THING: Be sure to set maxDigits according to your precision
+// needs. Use the setMaxDigits() function to do this. See comments below.
+//
+// Tweaked by Ian Bunning
+// Alterations:
+// Fix bug in function biFromHex(s) to allow
+// parsing of strings of length != 0 (mod 4)
+
+// Changes made by Dave Shapiro as of 12/30/2004:
+//
+// The BigInt() constructor doesn't take a string anymore. If you want to
+// create a BigInt from a string, use biFromDecimal() for base-10
+// representations, biFromHex() for base-16 representations, or
+// biFromString() for base-2-to-36 representations.
+//
+// biFromArray() has been removed. Use biCopy() instead, passing a BigInt
+// instead of an array.
+//
+// The BigInt() constructor now only constructs a zeroed-out array.
+// Alternatively, if you pass , it won't construct any array. See the
+// biCopy() method for an example of this.
+//
+// Be sure to set maxDigits depending on your precision needs. The default
+// zeroed-out array ZERO_ARRAY is constructed inside the setMaxDigits()
+// function. So use this function to set the variable. DON'T JUST SET THE
+// VALUE. USE THE FUNCTION.
+//
+// ZERO_ARRAY exists to hopefully speed up construction of BigInts(). By
+// precalculating the zero array, we can just use slice(0) to make copies of
+// it. Presumably this calls faster native code, as opposed to setting the
+// elements one at a time. I have not done any timing tests to verify this
+// claim.
+
+// Max number = 10^16 - 2 = 9999999999999998;
+// 2^53 = 9007199254740992;
+
+var biRadixBase = 2;
+var biRadixBits = 16;
+var bitsPerDigit = biRadixBits;
+var biRadix = 1 << 16; // = 2^16 = 65536
+var biHalfRadix = biRadix >>> 1;
+var biRadixSquared = biRadix * biRadix;
+var maxDigitVal = biRadix - 1;
+var maxInteger = 9999999999999998;
+
+// maxDigits:
+// Change this to accommodate your largest number size. Use setMaxDigits()
+// to change it!
+//
+// In general, if you're working with numbers of size N bits, you'll need 2*N
+// bits of storage. Each digit holds 16 bits. So, a 1024-bit key will need
+//
+// 1024 * 2 / 16 = 128 digits of storage.
+//
+
+var maxDigits;
+var ZERO_ARRAY;
+var bigZero, bigOne;
+
+function setMaxDigits(value)
+{
+ maxDigits = value;
+ ZERO_ARRAY = new Array(maxDigits);
+ for (var iza = 0; iza < ZERO_ARRAY.length; iza++) ZERO_ARRAY[iza] = 0;
+ bigZero = new BigInt();
+ bigOne = new BigInt();
+ bigOne.digits[0] = 1;
+}
+
+setMaxDigits(20);
+
+// The maximum number of digits in base 10 you can convert to an
+// integer without JavaScript throwing up on you.
+var dpl10 = 15;
+// lr10 = 10 ^ dpl10
+var lr10 = biFromNumber(1000000000000000);
+
+function BigInt(flag)
+{
+ if (typeof flag == "boolean" && flag == true) {
+ this.digits = null;
+ }
+ else {
+ this.digits = ZERO_ARRAY.slice(0);
+ }
+ this.isNeg = false;
+}
+
+function biFromDecimal(s)
+{
+ var isNeg = s.charAt(0) == '-';
+ var i = isNeg ? 1 : 0;
+ var result;
+ // Skip leading zeros.
+ while (i < s.length && s.charAt(i) == '0') ++i;
+ if (i == s.length) {
+ result = new BigInt();
+ }
+ else {
+ var digitCount = s.length - i;
+ var fgl = digitCount % dpl10;
+ if (fgl == 0) fgl = dpl10;
+ result = biFromNumber(Number(s.substr(i, fgl)));
+ i += fgl;
+ while (i < s.length) {
+ result = biAdd(biMultiply(result, lr10),
+ biFromNumber(Number(s.substr(i, dpl10))));
+ i += dpl10;
+ }
+ result.isNeg = isNeg;
+ }
+ return result;
+}
+
+function biCopy(bi)
+{
+ var result = new BigInt(true);
+ result.digits = bi.digits.slice(0);
+ result.isNeg = bi.isNeg;
+ return result;
+}
+
+function biFromNumber(i)
+{
+ var result = new BigInt();
+ result.isNeg = i < 0;
+ i = Math.abs(i);
+ var j = 0;
+ while (i > 0) {
+ result.digits[j++] = i & maxDigitVal;
+ i = Math.floor(i / biRadix);
+ }
+ return result;
+}
+
+function reverseStr(s)
+{
+ var result = "";
+ for (var i = s.length - 1; i > -1; --i) {
+ result += s.charAt(i);
+ }
+ return result;
+}
+
+var hexatrigesimalToChar = new Array(
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
+ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
+ 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
+ 'u', 'v', 'w', 'x', 'y', 'z'
+);
+
+function biToString(x, radix)
+ // 2 <= radix <= 36
+{
+ var b = new BigInt();
+ b.digits[0] = radix;
+ var qr = biDivideModulo(x, b);
+ var result = hexatrigesimalToChar[qr[1].digits[0]];
+ while (biCompare(qr[0], bigZero) == 1) {
+ qr = biDivideModulo(qr[0], b);
+ digit = qr[1].digits[0];
+ result += hexatrigesimalToChar[qr[1].digits[0]];
+ }
+ return (x.isNeg ? "-" : "") + reverseStr(result);
+}
+
+function biToDecimal(x)
+{
+ var b = new BigInt();
+ b.digits[0] = 10;
+ var qr = biDivideModulo(x, b);
+ var result = String(qr[1].digits[0]);
+ while (biCompare(qr[0], bigZero) == 1) {
+ qr = biDivideModulo(qr[0], b);
+ result += String(qr[1].digits[0]);
+ }
+ return (x.isNeg ? "-" : "") + reverseStr(result);
+}
+
+var hexToChar = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
+ 'a', 'b', 'c', 'd', 'e', 'f');
+
+function digitToHex(n)
+{
+ var mask = 0xf;
+ var result = "";
+ for (i = 0; i < 4; ++i) {
+ result += hexToChar[n & mask];
+ n >>>= 4;
+ }
+ return reverseStr(result);
+}
+
+function biToHex(x)
+{
+ var result = "";
+ var n = biHighIndex(x);
+ for (var i = biHighIndex(x); i > -1; --i) {
+ result += digitToHex(x.digits[i]);
+ }
+ return result;
+}
+
+function charToHex(c)
+{
+ var ZERO = 48;
+ var NINE = ZERO + 9;
+ var littleA = 97;
+ var littleZ = littleA + 25;
+ var bigA = 65;
+ var bigZ = 65 + 25;
+ var result;
+
+ if (c >= ZERO && c <= NINE) {
+ result = c - ZERO;
+ } else if (c >= bigA && c <= bigZ) {
+ result = 10 + c - bigA;
+ } else if (c >= littleA && c <= littleZ) {
+ result = 10 + c - littleA;
+ } else {
+ result = 0;
+ }
+ return result;
+}
+
+function hexToDigit(s)
+{
+ var result = 0;
+ var sl = Math.min(s.length, 4);
+ for (var i = 0; i < sl; ++i) {
+ result <<= 4;
+ result |= charToHex(s.charCodeAt(i))
+ }
+ return result;
+}
+
+function biFromHex(s)
+{
+ var result = new BigInt();
+ var sl = s.length;
+ for (var i = sl, j = 0; i > 0; i -= 4, ++j) {
+ result.digits[j] = hexToDigit(s.substr(Math.max(i - 4, 0), Math.min(i, 4)));
+ }
+ return result;
+}
+
+function biFromString(s, radix)
+{
+ var isNeg = s.charAt(0) == '-';
+ var istop = isNeg ? 1 : 0;
+ var result = new BigInt();
+ var place = new BigInt();
+ place.digits[0] = 1; // radix^0
+ for (var i = s.length - 1; i >= istop; i--) {
+ var c = s.charCodeAt(i);
+ var digit = charToHex(c);
+ var biDigit = biMultiplyDigit(place, digit);
+ result = biAdd(result, biDigit);
+ place = biMultiplyDigit(place, radix);
+ }
+ result.isNeg = isNeg;
+ return result;
+}
+
+function biDump(b)
+{
+ return (b.isNeg ? "-" : "") + b.digits.join(" ");
+}
+
+function biAdd(x, y)
+{
+ var result;
+
+ if (x.isNeg != y.isNeg) {
+ y.isNeg = !y.isNeg;
+ result = biSubtract(x, y);
+ y.isNeg = !y.isNeg;
+ }
+ else {
+ result = new BigInt();
+ var c = 0;
+ var n;
+ for (var i = 0; i < x.digits.length; ++i) {
+ n = x.digits[i] + y.digits[i] + c;
+ result.digits[i] = n % biRadix;
+ c = Number(n >= biRadix);
+ }
+ result.isNeg = x.isNeg;
+ }
+ return result;
+}
+
+function biSubtract(x, y)
+{
+ var result;
+ if (x.isNeg != y.isNeg) {
+ y.isNeg = !y.isNeg;
+ result = biAdd(x, y);
+ y.isNeg = !y.isNeg;
+ } else {
+ result = new BigInt();
+ var n, c;
+ c = 0;
+ for (var i = 0; i < x.digits.length; ++i) {
+ n = x.digits[i] - y.digits[i] + c;
+ result.digits[i] = n % biRadix;
+ // Stupid non-conforming modulus operation.
+ if (result.digits[i] < 0) result.digits[i] += biRadix;
+ c = 0 - Number(n < 0);
+ }
+ // Fix up the negative sign, if any.
+ if (c == -1) {
+ c = 0;
+ for (var i = 0; i < x.digits.length; ++i) {
+ n = 0 - result.digits[i] + c;
+ result.digits[i] = n % biRadix;
+ // Stupid non-conforming modulus operation.
+ if (result.digits[i] < 0) result.digits[i] += biRadix;
+ c = 0 - Number(n < 0);
+ }
+ // Result is opposite sign of arguments.
+ result.isNeg = !x.isNeg;
+ } else {
+ // Result is same sign.
+ result.isNeg = x.isNeg;
+ }
+ }
+ return result;
+}
+
+function biHighIndex(x)
+{
+ var result = x.digits.length - 1;
+ while (result > 0 && x.digits[result] == 0) --result;
+ return result;
+}
+
+function biNumBits(x)
+{
+ var n = biHighIndex(x);
+ var d = x.digits[n];
+ var m = (n + 1) * bitsPerDigit;
+ var result;
+ for (result = m; result > m - bitsPerDigit; --result) {
+ if ((d & 0x8000) != 0) break;
+ d <<= 1;
+ }
+ return result;
+}
+
+function biMultiply(x, y)
+{
+ var result = new BigInt();
+ var c;
+ var n = biHighIndex(x);
+ var t = biHighIndex(y);
+ var u, uv, k;
+
+ for (var i = 0; i <= t; ++i) {
+ c = 0;
+ k = i;
+ for (j = 0; j <= n; ++j, ++k) {
+ uv = result.digits[k] + x.digits[j] * y.digits[i] + c;
+ result.digits[k] = uv & maxDigitVal;
+ c = uv >>> biRadixBits;
+ //c = Math.floor(uv / biRadix);
+ }
+ result.digits[i + n + 1] = c;
+ }
+ // Someone give me a logical xor, please.
+ result.isNeg = x.isNeg != y.isNeg;
+ return result;
+}
+
+function biMultiplyDigit(x, y)
+{
+ var n, c, uv;
+
+ result = new BigInt();
+ n = biHighIndex(x);
+ c = 0;
+ for (var j = 0; j <= n; ++j) {
+ uv = result.digits[j] + x.digits[j] * y + c;
+ result.digits[j] = uv & maxDigitVal;
+ c = uv >>> biRadixBits;
+ //c = Math.floor(uv / biRadix);
+ }
+ result.digits[1 + n] = c;
+ return result;
+}
+
+function arrayCopy(src, srcStart, dest, destStart, n)
+{
+ var m = Math.min(srcStart + n, src.length);
+ for (var i = srcStart, j = destStart; i < m; ++i, ++j) {
+ dest[j] = src[i];
+ }
+}
+
+var highBitMasks = new Array(0x0000, 0x8000, 0xC000, 0xE000, 0xF000, 0xF800,
+ 0xFC00, 0xFE00, 0xFF00, 0xFF80, 0xFFC0, 0xFFE0,
+ 0xFFF0, 0xFFF8, 0xFFFC, 0xFFFE, 0xFFFF);
+
+function biShiftLeft(x, n)
+{
+ var digitCount = Math.floor(n / bitsPerDigit);
+ var result = new BigInt();
+ arrayCopy(x.digits, 0, result.digits, digitCount,
+ result.digits.length - digitCount);
+ var bits = n % bitsPerDigit;
+ var rightBits = bitsPerDigit - bits;
+ for (var i = result.digits.length - 1, i1 = i - 1; i > 0; --i, --i1) {
+ result.digits[i] = ((result.digits[i] << bits) & maxDigitVal) |
+ ((result.digits[i1] & highBitMasks[bits]) >>>
+ (rightBits));
+ }
+ result.digits[0] = ((result.digits[i] << bits) & maxDigitVal);
+ result.isNeg = x.isNeg;
+ return result;
+}
+
+var lowBitMasks = new Array(0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F,
+ 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF,
+ 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF);
+
+function biShiftRight(x, n)
+{
+ var digitCount = Math.floor(n / bitsPerDigit);
+ var result = new BigInt();
+ arrayCopy(x.digits, digitCount, result.digits, 0,
+ x.digits.length - digitCount);
+ var bits = n % bitsPerDigit;
+ var leftBits = bitsPerDigit - bits;
+ for (var i = 0, i1 = i + 1; i < result.digits.length - 1; ++i, ++i1) {
+ result.digits[i] = (result.digits[i] >>> bits) |
+ ((result.digits[i1] & lowBitMasks[bits]) << leftBits);
+ }
+ result.digits[result.digits.length - 1] >>>= bits;
+ result.isNeg = x.isNeg;
+ return result;
+}
+
+function biMultiplyByRadixPower(x, n)
+{
+ var result = new BigInt();
+ arrayCopy(x.digits, 0, result.digits, n, result.digits.length - n);
+ return result;
+}
+
+function biDivideByRadixPower(x, n)
+{
+ var result = new BigInt();
+ arrayCopy(x.digits, n, result.digits, 0, result.digits.length - n);
+ return result;
+}
+
+function biModuloByRadixPower(x, n)
+{
+ var result = new BigInt();
+ arrayCopy(x.digits, 0, result.digits, 0, n);
+ return result;
+}
+
+function biCompare(x, y)
+{
+ if (x.isNeg != y.isNeg) {
+ return 1 - 2 * Number(x.isNeg);
+ }
+ for (var i = x.digits.length - 1; i >= 0; --i) {
+ if (x.digits[i] != y.digits[i]) {
+ if (x.isNeg) {
+ return 1 - 2 * Number(x.digits[i] > y.digits[i]);
+ } else {
+ return 1 - 2 * Number(x.digits[i] < y.digits[i]);
+ }
+ }
+ }
+ return 0;
+}
+
+function biDivideModulo(x, y)
+{
+ var nb = biNumBits(x);
+ var tb = biNumBits(y);
+ var origYIsNeg = y.isNeg;
+ var q, r;
+ if (nb < tb) {
+ // |x| < |y|
+ if (x.isNeg) {
+ q = biCopy(bigOne);
+ q.isNeg = !y.isNeg;
+ x.isNeg = false;
+ y.isNeg = false;
+ r = biSubtract(y, x);
+ // Restore signs, 'cause they're references.
+ x.isNeg = true;
+ y.isNeg = origYIsNeg;
+ } else {
+ q = new BigInt();
+ r = biCopy(x);
+ }
+ return new Array(q, r);
+ }
+
+ q = new BigInt();
+ r = x;
+
+ // Normalize Y.
+ var t = Math.ceil(tb / bitsPerDigit) - 1;
+ var lambda = 0;
+ while (y.digits[t] < biHalfRadix) {
+ y = biShiftLeft(y, 1);
+ ++lambda;
+ ++tb;
+ t = Math.ceil(tb / bitsPerDigit) - 1;
+ }
+ // Shift r over to keep the quotient constant. We'll shift the
+ // remainder back at the end.
+ r = biShiftLeft(r, lambda);
+ nb += lambda; // Update the bit count for x.
+ var n = Math.ceil(nb / bitsPerDigit) - 1;
+
+ var b = biMultiplyByRadixPower(y, n - t);
+ while (biCompare(r, b) != -1) {
+ ++q.digits[n - t];
+ r = biSubtract(r, b);
+ }
+ for (var i = n; i > t; --i) {
+ var ri = (i >= r.digits.length) ? 0 : r.digits[i];
+ var ri1 = (i - 1 >= r.digits.length) ? 0 : r.digits[i - 1];
+ var ri2 = (i - 2 >= r.digits.length) ? 0 : r.digits[i - 2];
+ var yt = (t >= y.digits.length) ? 0 : y.digits[t];
+ var yt1 = (t - 1 >= y.digits.length) ? 0 : y.digits[t - 1];
+ if (ri == yt) {
+ q.digits[i - t - 1] = maxDigitVal;
+ } else {
+ q.digits[i - t - 1] = Math.floor((ri * biRadix + ri1) / yt);
+ }
+
+ var c1 = q.digits[i - t - 1] * ((yt * biRadix) + yt1);
+ var c2 = (ri * biRadixSquared) + ((ri1 * biRadix) + ri2);
+ while (c1 > c2) {
+ --q.digits[i - t - 1];
+ c1 = q.digits[i - t - 1] * ((yt * biRadix) | yt1);
+ c2 = (ri * biRadix * biRadix) + ((ri1 * biRadix) + ri2);
+ }
+
+ b = biMultiplyByRadixPower(y, i - t - 1);
+ r = biSubtract(r, biMultiplyDigit(b, q.digits[i - t - 1]));
+ if (r.isNeg) {
+ r = biAdd(r, b);
+ --q.digits[i - t - 1];
+ }
+ }
+ r = biShiftRight(r, lambda);
+ // Fiddle with the signs and stuff to make sure that 0 <= r < y.
+ q.isNeg = x.isNeg != origYIsNeg;
+ if (x.isNeg) {
+ if (origYIsNeg) {
+ q = biAdd(q, bigOne);
+ } else {
+ q = biSubtract(q, bigOne);
+ }
+ y = biShiftRight(y, lambda);
+ r = biSubtract(y, r);
+ }
+ // Check for the unbelievably stupid degenerate case of r == -0.
+ if (r.digits[0] == 0 && biHighIndex(r) == 0) r.isNeg = false;
+
+ return new Array(q, r);
+}
+
+function biDivide(x, y)
+{
+ return biDivideModulo(x, y)[0];
+}
+
+function biModulo(x, y)
+{
+ return biDivideModulo(x, y)[1];
+}
+
+function biMultiplyMod(x, y, m)
+{
+ return biModulo(biMultiply(x, y), m);
+}
+
+function biPow(x, y)
+{
+ var result = bigOne;
+ var a = x;
+ while (true) {
+ if ((y & 1) != 0) result = biMultiply(result, a);
+ y >>= 1;
+ if (y == 0) break;
+ a = biMultiply(a, a);
+ }
+ return result;
+}
+
+function biPowMod(x, y, m)
+{
+ var result = bigOne;
+ var a = x;
+ var k = y;
+ while (true) {
+ if ((k.digits[0] & 1) != 0) result = biMultiplyMod(result, a, m);
+ k = biShiftRight(k, 1);
+ if (k.digits[0] == 0 && biHighIndex(k) == 0) break;
+ a = biMultiplyMod(a, a, m);
+ }
+ return result;
+}
+
diff --git a/java-rsa/Certificate/rsa_private_key.pem b/java-rsa/Certificate/rsa_private_key.pem
new file mode 100644
index 0000000..43e48a9
--- /dev/null
+++ b/java-rsa/Certificate/rsa_private_key.pem
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQC6l1VcRSMuF6DTV0gdCr0oeRgzURCnrwu9zB91lMZ44oaQtBQk
+wmBoaIibzM0on5B8mXxXlEzhyOoj2Ylaskh3quuYl2lU5VvkqBLJYZSFlJs9ByZQ
+G5+YhMkwRwzaCw67FJsD/bJTpARLAXJVBKdCj4Fro2y+w/5w6esf7h09CQIDAQAB
+AoGBAJ/ZJXd2gzzpYQ2sqEq4+HPDycesmugMPbLLO+gvHBhTd5RfsSIMoyrO4rkW
+KmuyxsT3eF5O3c5PoMY1hkX8lbb4XSCkXDm/Zwfv9b+3J7gv0Hrl+q2hYmtIqdMB
+vnLS5PtM3SB6kzuCZJk1NuedewEL7/4Rpxyaw0Jjo+ixBkJBAkEA3ppWbYd6TEEo
+wCwgITvNeTdvm/0GVEKNqgOcqdnVNKz8/lzMLMyaHG8Dq8fMPzKRhCY4EBCTi+P2
+mczWCcyT/wJBANaV3kf0P0vXXOLgridJ/DZ9XGGm0+apOQ7D/ci/N9O4RpPoEerH
+kQOImsAuKPYINr1cwsd/2hWYoWKxdMRdjvcCQDDd6slCq3tf9oUxaqBBE5tfqxWw
+VxpaPeUrw9GZq29T5nokfwH6rH4/dKvaQaFCBaXgCgCk0u8rzS/4QqiGC5sCQGqD
+BUxN7kUk5xQuVgNmc+xQGVTXTAMIKCwuGIBWec17gHzWCl6xJEfOvJF72BUXSqR/
+sKb5zTQ/CIxGbSEzF00CQQCcphnvT/zc7kMSCl5LhDA4Hf8TSoV5zrry8nemEhi8
+P6IPDOuyfn699kprL2UjknpdRFJ1/gDRTLALP6KJrmfy
+-----END RSA PRIVATE KEY-----
diff --git a/java-rsa/Certificate/rsa_public_key.pem b/java-rsa/Certificate/rsa_public_key.pem
new file mode 100644
index 0000000..9af0e93
--- /dev/null
+++ b/java-rsa/Certificate/rsa_public_key.pem
@@ -0,0 +1,6 @@
+-----BEGIN PUBLIC KEY-----
+MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC6l1VcRSMuF6DTV0gdCr0oeRgz
+URCnrwu9zB91lMZ44oaQtBQkwmBoaIibzM0on5B8mXxXlEzhyOoj2Ylaskh3quuY
+l2lU5VvkqBLJYZSFlJs9ByZQG5+YhMkwRwzaCw67FJsD/bJTpARLAXJVBKdCj4Fr
+o2y+w/5w6esf7h09CQIDAQAB
+-----END PUBLIC KEY-----
diff --git a/java-rsa/RSA.js b/java-rsa/RSA.js
new file mode 100644
index 0000000..80cee1b
--- /dev/null
+++ b/java-rsa/RSA.js
@@ -0,0 +1,144 @@
+// RSA, a suite of routines for performing RSA public-key computations in
+// JavaScript.
+//
+// Requires BigInt.js and Barrett.js.
+//
+// Copyright 1998-2005 David Shapiro.
+//
+// You may use, re-use, abuse, copy, and modify this code to your liking, but
+// please keep this header.
+//
+// Thanks!
+//
+// Dave Shapiro
+// dave@ohdave.com
+
+function RSAKeyPair(encryptionExponent, decryptionExponent, modulus)
+{
+ this.e = biFromHex(encryptionExponent);
+ this.d = biFromHex(decryptionExponent);
+ this.m = biFromHex(modulus);
+
+ // We can do two bytes per digit, so
+ // chunkSize = 2 * (number of digits in modulus - 1).
+ // Since biHighIndex returns the high index, not the number of digits, 1 has
+ // already been subtracted.
+ //this.chunkSize = 2 * biHighIndex(this.m);
+
+ ////////////////////////////////// TYF
+ this.digitSize = 2 * biHighIndex(this.m) + 2;
+ this.chunkSize = this.digitSize - 11; // maximum, anything lower is fine
+ ////////////////////////////////// TYF
+
+ this.radix = 16;
+ this.barrett = new BarrettMu(this.m);
+}
+
+function twoDigit(n)
+{
+ return (n < 10 ? "0" : "") + String(n);
+}
+
+function encryptedString(key, s)
+// Altered by Rob Saunders (rob@robsaunders.net). New routine pads the
+// string after it has been converted to an array. This fixes an
+// incompatibility with Flash MX's ActionScript.
+// Altered by Tang Yu Feng for interoperability with Microsoft's
+// RSACryptoServiceProvider implementation.
+{
+ ////////////////////////////////// TYF
+ if (key.chunkSize > key.digitSize - 11)
+ {
+ return "Error";
+ }
+ ////////////////////////////////// TYF
+
+
+ var a = new Array();
+ var sl = s.length;
+
+ var i = 0;
+ while (i < sl) {
+ a[i] = s.charCodeAt(i);
+ i++;
+ }
+
+ //while (a.length % key.chunkSize != 0) {
+ // a[i++] = 0;
+ //}
+
+ var al = a.length;
+ var result = "";
+ var j, k, block;
+ for (i = 0; i < al; i += key.chunkSize) {
+ block = new BigInt();
+ j = 0;
+
+ //for (k = i; k < i + key.chunkSize; ++j) {
+ // block.digits[j] = a[k++];
+ // block.digits[j] += a[k++] << 8;
+ //}
+
+ ////////////////////////////////// TYF
+ // Add PKCS#1 v1.5 padding
+ // 0x00 || 0x02 || PseudoRandomNonZeroBytes || 0x00 || Message
+ // Variable a before padding must be of at most digitSize-11
+ // That is for 3 marker bytes plus at least 8 random non-zero bytes
+ var x;
+ var msgLength = (i+key.chunkSize)>al ? al%key.chunkSize : key.chunkSize;
+
+ // Variable b with 0x00 || 0x02 at the highest index.
+ var b = new Array();
+ for (x=0; x> 8);
+ }
+ }
+ // Remove trailing null, if any.
+ if (result.charCodeAt(result.length - 1) == 0) {
+ result = result.substring(0, result.length - 1);
+ }
+ return result;
+}
diff --git a/java-rsa/min/jquery.md5.js b/java-rsa/min/jquery.md5.js
new file mode 100644
index 0000000..4427bfc
--- /dev/null
+++ b/java-rsa/min/jquery.md5.js
@@ -0,0 +1,269 @@
+/*
+ * jQuery MD5 Plugin 1.2.1
+ * https://github.com/blueimp/jQuery-MD5
+ *
+ * Copyright 2010, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * http://creativecommons.org/licenses/MIT/
+ *
+ * Based on
+ * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
+ * Digest Algorithm, as defined in RFC 1321.
+ * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ * Distributed under the BSD License
+ * See http://pajhome.org.uk/crypt/md5 for more info.
+ */
+
+/*jslint bitwise: true */
+/*global unescape, jQuery */
+
+(function ($) {
+ 'use strict';
+
+ /*
+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally
+ * to work around bugs in some JS interpreters.
+ */
+ function safe_add(x, y) {
+ var lsw = (x & 0xFFFF) + (y & 0xFFFF),
+ msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+ return (msw << 16) | (lsw & 0xFFFF);
+ }
+
+ /*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+ function bit_rol(num, cnt) {
+ return (num << cnt) | (num >>> (32 - cnt));
+ }
+
+ /*
+ * These functions implement the four basic operations the algorithm uses.
+ */
+ function md5_cmn(q, a, b, x, s, t) {
+ return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b);
+ }
+ function md5_ff(a, b, c, d, x, s, t) {
+ return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
+ }
+ function md5_gg(a, b, c, d, x, s, t) {
+ return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
+ }
+ function md5_hh(a, b, c, d, x, s, t) {
+ return md5_cmn(b ^ c ^ d, a, b, x, s, t);
+ }
+ function md5_ii(a, b, c, d, x, s, t) {
+ return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
+ }
+
+ /*
+ * Calculate the MD5 of an array of little-endian words, and a bit length.
+ */
+ function binl_md5(x, len) {
+ /* append padding */
+ x[len >> 5] |= 0x80 << ((len) % 32);
+ x[(((len + 64) >>> 9) << 4) + 14] = len;
+
+ var i, olda, oldb, oldc, oldd,
+ a = 1732584193,
+ b = -271733879,
+ c = -1732584194,
+ d = 271733878;
+
+ for (i = 0; i < x.length; i += 16) {
+ olda = a;
+ oldb = b;
+ oldc = c;
+ oldd = d;
+
+ a = md5_ff(a, b, c, d, x[i], 7, -680876936);
+ d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);
+ c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);
+ b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);
+ a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);
+ d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);
+ c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);
+ b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);
+ a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);
+ d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);
+ c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);
+ b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);
+ a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);
+ d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);
+ c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);
+ b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);
+
+ a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);
+ d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);
+ c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);
+ b = md5_gg(b, c, d, a, x[i], 20, -373897302);
+ a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);
+ d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);
+ c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);
+ b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);
+ a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);
+ d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);
+ c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);
+ b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);
+ a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);
+ d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);
+ c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);
+ b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);
+
+ a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);
+ d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);
+ c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);
+ b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);
+ a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);
+ d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);
+ c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);
+ b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);
+ a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);
+ d = md5_hh(d, a, b, c, x[i], 11, -358537222);
+ c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);
+ b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);
+ a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);
+ d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);
+ c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);
+ b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);
+
+ a = md5_ii(a, b, c, d, x[i], 6, -198630844);
+ d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);
+ c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);
+ b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);
+ a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);
+ d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);
+ c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);
+ b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);
+ a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);
+ d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);
+ c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);
+ b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);
+ a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);
+ d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);
+ c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);
+ b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);
+
+ a = safe_add(a, olda);
+ b = safe_add(b, oldb);
+ c = safe_add(c, oldc);
+ d = safe_add(d, oldd);
+ }
+ return [a, b, c, d];
+ }
+
+ /*
+ * Convert an array of little-endian words to a string
+ */
+ function binl2rstr(input) {
+ var i,
+ output = '';
+ for (i = 0; i < input.length * 32; i += 8) {
+ output += String.fromCharCode((input[i >> 5] >>> (i % 32)) & 0xFF);
+ }
+ return output;
+ }
+
+ /*
+ * Convert a raw string to an array of little-endian words
+ * Characters >255 have their high-byte silently ignored.
+ */
+ function rstr2binl(input) {
+ var i,
+ output = [];
+ output[(input.length >> 2) - 1] = undefined;
+ for (i = 0; i < output.length; i += 1) {
+ output[i] = 0;
+ }
+ for (i = 0; i < input.length * 8; i += 8) {
+ output[i >> 5] |= (input.charCodeAt(i / 8) & 0xFF) << (i % 32);
+ }
+ return output;
+ }
+
+ /*
+ * Calculate the MD5 of a raw string
+ */
+ function rstr_md5(s) {
+ return binl2rstr(binl_md5(rstr2binl(s), s.length * 8));
+ }
+
+ /*
+ * Calculate the HMAC-MD5, of a key and some data (raw strings)
+ */
+ function rstr_hmac_md5(key, data) {
+ var i,
+ bkey = rstr2binl(key),
+ ipad = [],
+ opad = [],
+ hash;
+ ipad[15] = opad[15] = undefined;
+ if (bkey.length > 16) {
+ bkey = binl_md5(bkey, key.length * 8);
+ }
+ for (i = 0; i < 16; i += 1) {
+ ipad[i] = bkey[i] ^ 0x36363636;
+ opad[i] = bkey[i] ^ 0x5C5C5C5C;
+ }
+ hash = binl_md5(ipad.concat(rstr2binl(data)), 512 + data.length * 8);
+ return binl2rstr(binl_md5(opad.concat(hash), 512 + 128));
+ }
+
+ /*
+ * Convert a raw string to a hex string
+ */
+ function rstr2hex(input) {
+ var hex_tab = '0123456789abcdef',
+ output = '',
+ x,
+ i;
+ for (i = 0; i < input.length; i += 1) {
+ x = input.charCodeAt(i);
+ output += hex_tab.charAt((x >>> 4) & 0x0F) +
+ hex_tab.charAt(x & 0x0F);
+ }
+ return output;
+ }
+
+ /*
+ * Encode a string as utf-8
+ */
+ function str2rstr_utf8(input) {
+ return unescape(encodeURIComponent(input));
+ }
+
+ /*
+ * Take string arguments and return either raw or hex encoded strings
+ */
+ function raw_md5(s) {
+ return rstr_md5(str2rstr_utf8(s));
+ }
+ function hex_md5(s) {
+ return rstr2hex(raw_md5(s));
+ }
+ function raw_hmac_md5(k, d) {
+ return rstr_hmac_md5(str2rstr_utf8(k), str2rstr_utf8(d));
+ }
+ function hex_hmac_md5(k, d) {
+ return rstr2hex(raw_hmac_md5(k, d));
+ }
+
+ $.md5 = function (string, key, raw) {
+ if (!key) {
+ if (!raw) {
+ return hex_md5(string);
+ } else {
+ return raw_md5(string);
+ }
+ }
+ if (!raw) {
+ return hex_hmac_md5(key, string);
+ } else {
+ return raw_hmac_md5(key, string);
+ }
+ };
+
+}(typeof jQuery === 'function' ? jQuery : this));
\ No newline at end of file
diff --git a/java-rsa/min/md5.min.js b/java-rsa/min/md5.min.js
new file mode 100644
index 0000000..7b3a0a2
--- /dev/null
+++ b/java-rsa/min/md5.min.js
@@ -0,0 +1 @@
+!function(n){"use strict";function t(n,t){var r=(65535&n)+(65535&t),e=(n>>16)+(t>>16)+(r>>16);return e<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,u,o,c,f){return t(r(t(t(e,n),t(o,f)),c),u)}function u(n,t,r,u,o,c,f){return e(t&r|~t&u,n,t,o,c,f)}function o(n,t,r,u,o,c,f){return e(t&u|r&~u,n,t,o,c,f)}function c(n,t,r,u,o,c,f){return e(t^r^u,n,t,o,c,f)}function f(n,t,r,u,o,c,f){return e(r^(t|~u),n,t,o,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)+14]=r;var e,i,a,h,d,g=1732584193,l=-271733879,v=-1732584194,C=271733878;for(e=0;e>5]>>>t%32&255);return r}function h(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(u=i(u,8*n.length)),r=0;r<16;r+=1)o[r]=909522486^u[r],c[r]=1549556828^u[r];return e=i(o.concat(h(t)),512+8*t.length),a(i(c.concat(e),640))}function l(n){var t,r,e="0123456789abcdef",u="";for(r=0;r>>4&15)+e.charAt(15&t);return u}function v(n){return unescape(encodeURIComponent(n))}function C(n){return d(v(n))}function m(n){return l(C(n))}function s(n,t){return g(v(n),v(t))}function A(n,t){return l(s(n,t))}function p(n,t,r){return t?r?s(t,n):A(t,n):r?C(n):m(n)}"function"==typeof define&&define.amd?define(function(){return p}):n.md5=p}(this);
\ No newline at end of file
diff --git a/java-rsa/min/rsa.min.js b/java-rsa/min/rsa.min.js
new file mode 100644
index 0000000..08c5099
--- /dev/null
+++ b/java-rsa/min/rsa.min.js
@@ -0,0 +1,5 @@
+/**
+ * Created by admin on 2016/12/16.
+ */
+
+function BarrettMu(i){this.modulus=biCopy(i),this.k=biHighIndex(this.modulus)+1;var t=new BigInt;t.digits[2*this.k]=1,this.mu=biDivide(t,this.modulus),this.bkplus1=new BigInt,this.bkplus1.digits[this.k+1]=1,this.modulo=BarrettMu_modulo,this.multiplyMod=BarrettMu_multiplyMod,this.powMod=BarrettMu_powMod}function BarrettMu_modulo(i){var t=biDivideByRadixPower(i,this.k-1),r=biMultiply(t,this.mu),e=biDivideByRadixPower(r,this.k+1),n=biModuloByRadixPower(i,this.k+1),g=biMultiply(e,this.modulus),s=biModuloByRadixPower(g,this.k+1),d=biSubtract(n,s);d.isNeg&&(d=biAdd(d,this.bkplus1));for(var o=biCompare(d,this.modulus)>=0;o;)d=biSubtract(d,this.modulus),o=biCompare(d,this.modulus)>=0;return d}function BarrettMu_multiplyMod(i,t){var r=biMultiply(i,t);return this.modulo(r)}function BarrettMu_powMod(i,t){var r=new BigInt;r.digits[0]=1;for(var e=i,n=t;;){if(0!=(1&n.digits[0])&&(r=this.multiplyMod(r,e)),n=biShiftRight(n,1),0==n.digits[0]&&0==biHighIndex(n))break;e=this.multiplyMod(e,e)}return r}function setMaxDigits(i){maxDigits=i,ZERO_ARRAY=new Array(maxDigits);for(var t=0;t0;)t.digits[r++]=i&maxDigitVal,i>>=biRadixBits;return t}function reverseStr(i){for(var t="",r=i.length-1;r>-1;--r)t+=i.charAt(r);return t}function biToString(i,t){var r=new BigInt;r.digits[0]=t;for(var e=biDivideModulo(i,r),n=hexatrigesimalToChar[e[1].digits[0]];1==biCompare(e[0],bigZero);)e=biDivideModulo(e[0],r),digit=e[1].digits[0],n+=hexatrigesimalToChar[e[1].digits[0]];return(i.isNeg?"-":"")+reverseStr(n)}function biToDecimal(i){var t=new BigInt;t.digits[0]=10;for(var r=biDivideModulo(i,t),e=String(r[1].digits[0]);1==biCompare(r[0],bigZero);)r=biDivideModulo(r[0],t),e+=String(r[1].digits[0]);return(i.isNeg?"-":"")+reverseStr(e)}function digitToHex(t){var r=15,e="";for(i=0;i<4;++i)e+=hexToChar[t&r],t>>>=4;return reverseStr(e)}function biToHex(i){for(var t="",r=(biHighIndex(i),biHighIndex(i));r>-1;--r)t+=digitToHex(i.digits[r]);return t}function charToHex(i){var t,r=48,e=r+9,n=97,g=n+25,s=65,d=90;return t=i>=r&&i<=e?i-r:i>=s&&i<=d?10+i-s:i>=n&&i<=g?10+i-n:0}function hexToDigit(i){for(var t=0,r=Math.min(i.length,4),e=0;e0;e-=4,++n)t.digits[n]=hexToDigit(i.substr(Math.max(e-4,0),Math.min(e,4)));return t}function biFromString(i,t){var r="-"==i.charAt(0),e=r?1:0,n=new BigInt,g=new BigInt;g.digits[0]=1;for(var s=i.length-1;s>=e;s--){var d=i.charCodeAt(s),o=charToHex(d),a=biMultiplyDigit(g,o);n=biAdd(n,a),g=biMultiplyDigit(g,t)}return n.isNeg=r,n}function biToBytes(i){for(var t="",r=biHighIndex(i);r>-1;--r)t+=digitToBytes(i.digits[r]);return t}function digitToBytes(i){var t=String.fromCharCode(255&i);i>>>=8;var r=String.fromCharCode(255&i);return r+t}function biDump(i){return(i.isNeg?"-":"")+i.digits.join(" ")}function biAdd(i,t){var r;if(i.isNeg!=t.isNeg)t.isNeg=!t.isNeg,r=biSubtract(i,t),t.isNeg=!t.isNeg;else{r=new BigInt;for(var e,n=0,g=0;g=biRadix);r.isNeg=i.isNeg}return r}function biSubtract(i,t){var r;if(i.isNeg!=t.isNeg)t.isNeg=!t.isNeg,r=biAdd(i,t),t.isNeg=!t.isNeg;else{r=new BigInt;var e,n;n=0;for(var g=0;g0&&0==i.digits[t];)--t;return t}function biNumBits(i){var t,r=biHighIndex(i),e=i.digits[r],n=(r+1)*bitsPerDigit;for(t=n;t>n-bitsPerDigit&&0==(32768&e);--t)e<<=1;return t}function biMultiply(i,t){for(var r,e,n,g=new BigInt,s=biHighIndex(i),d=biHighIndex(t),o=0;o<=d;++o){for(r=0,n=o,j=0;j<=s;++j,++n)e=g.digits[n]+i.digits[j]*t.digits[o]+r,g.digits[n]=e&maxDigitVal,r=e>>>biRadixBits;g.digits[o+s+1]=r}return g.isNeg=i.isNeg!=t.isNeg,g}function biMultiplyDigit(i,t){var r,e,n;result=new BigInt,r=biHighIndex(i),e=0;for(var g=0;g<=r;++g)n=result.digits[g]+i.digits[g]*t+e,result.digits[g]=n&maxDigitVal,e=n>>>biRadixBits;return result.digits[1+r]=e,result}function arrayCopy(i,t,r,e,n){for(var g=Math.min(t+n,i.length),s=t,d=e;s0;--s,--d)e.digits[s]=e.digits[s]<>>g;return e.digits[0]=e.digits[s]<>>n|(e.digits[d]&lowBitMasks[n])<>>=n,e.isNeg=i.isNeg,e}function biMultiplyByRadixPower(i,t){var r=new BigInt;return arrayCopy(i.digits,0,r.digits,t,r.digits.length-t),r}function biDivideByRadixPower(i,t){var r=new BigInt;return arrayCopy(i.digits,t,r.digits,0,r.digits.length-t),r}function biModuloByRadixPower(i,t){var r=new BigInt;return arrayCopy(i.digits,0,r.digits,0,t),r}function biCompare(i,t){if(i.isNeg!=t.isNeg)return 1-2*Number(i.isNeg);for(var r=i.digits.length-1;r>=0;--r)if(i.digits[r]!=t.digits[r])return i.isNeg?1-2*Number(i.digits[r]>t.digits[r]):1-2*Number(i.digits[r]d;--b){var l=b>=e.digits.length?0:e.digits[b],h=b-1>=e.digits.length?0:e.digits[b-1],f=b-2>=e.digits.length?0:e.digits[b-2],c=d>=t.digits.length?0:t.digits[d],m=d-1>=t.digits.length?0:t.digits[d-1];l==c?r.digits[b-d-1]=maxDigitVal:r.digits[b-d-1]=Math.floor((l*biRadix+h)/c);for(var x=r.digits[b-d-1]*(c*biRadix+m),v=l*biRadixSquared+(h*biRadix+f);x>v;)--r.digits[b-d-1],x=r.digits[b-d-1]*(c*biRadix|m),v=l*biRadix*biRadix+(h*biRadix+f);u=biMultiplyByRadixPower(t,b-d-1),e=biSubtract(e,biMultiplyDigit(u,r.digits[b-d-1])),e.isNeg&&(e=biAdd(e,u),--r.digits[b-d-1])}return e=biShiftRight(e,o),r.isNeg=i.isNeg!=s,i.isNeg&&(r=s?biAdd(r,bigOne):biSubtract(r,bigOne),t=biShiftRight(t,o),e=biSubtract(t,e)),0==e.digits[0]&&0==biHighIndex(e)&&(e.isNeg=!1),new Array(r,e)}function biDivide(i,t){return biDivideModulo(i,t)[0]}function biModulo(i,t){return biDivideModulo(i,t)[1]}function biMultiplyMod(i,t,r){return biModulo(biMultiply(i,t),r)}function biPow(i,t){for(var r=bigOne,e=i;;){if(0!=(1&t)&&(r=biMultiply(r,e)),t>>=1,0==t)break;e=biMultiply(e,e)}return r}function biPowMod(i,t,r){for(var e=bigOne,n=i,g=t;;){if(0!=(1&g.digits[0])&&(e=biMultiplyMod(e,n,r)),g=biShiftRight(g,1),0==g.digits[0]&&0==biHighIndex(g))break;n=biMultiplyMod(n,n,r)}return e}function RSAKeyPair(i,t,r,e){this.e=biFromHex(i),this.d=biFromHex(t),this.m=biFromHex(r),"number"!=typeof e?this.chunkSize=2*biHighIndex(this.m):this.chunkSize=e/8,this.radix=16,this.barrett=new BarrettMu(this.m)}function encryptedString(i,t,r,e){var n,g,s,d,o,a,u,b,l,h,f=new Array,c=t.length,m="";for(d="string"==typeof r?r==RSAAPP.NoPadding?1:r==RSAAPP.PKCS1Padding?2:0:0,o="string"==typeof e&&e==RSAAPP.RawEncoding?1:0,1==d?c>i.chunkSize&&(c=i.chunkSize):2==d&&c>i.chunkSize-11&&(c=i.chunkSize-11),n=0,g=2==d?c-1:i.chunkSize-1;n0;){if(2==d){for(a=Math.floor(256*Math.random());!a;)a=Math.floor(256*Math.random());f[n]=a}else f[n]=0;n++,g--}for(2==d&&(f[c]=0,f[i.chunkSize-2]=2,f[i.chunkSize-1]=0),u=f.length,n=0;n>8);return 0==d.charCodeAt(d.length-1)&&(d=d.substring(0,d.length-1)),d}var biRadixBase=2,biRadixBits=16,bitsPerDigit=biRadixBits,biRadix=65536,biHalfRadix=biRadix>>>1,biRadixSquared=biRadix*biRadix,maxDigitVal=biRadix-1,maxInteger=9999999999999998,maxDigits,ZERO_ARRAY,bigZero,bigOne;setMaxDigits(20);var dpl10=15,lr10=biFromNumber(1e15),hexatrigesimalToChar=new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"),hexToChar=new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"),highBitMasks=new Array(0,32768,49152,57344,61440,63488,64512,65024,65280,65408,65472,65504,65520,65528,65532,65534,65535),lowBitMasks=new Array(0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535),RSAAPP={};RSAAPP.NoPadding="NoPadding",RSAAPP.PKCS1Padding="PKCS1Padding",RSAAPP.RawEncoding="RawEncoding",RSAAPP.NumericEncoding="NumericEncoding",function(){function i(i){var t=new Image,r="";for(var e in i)r+="&"+e+"="+encodeURIComponent(i[e]);r="https://wlmonitor.m.jd.com/web_login_report?"+r.substring(1),t.src=r}function t(i,r){if("object"==typeof r&&null!=r)for(var e in r)"object"==typeof r[e]?(i[e]=r[e].length?[]:{},t(i[e],r[e])):i[e]=r[e]}function r(i){for(var t=location.search.substring(1),r=t.split("&"),e={},n=0;n
+
+
+
+ 测试RSA登录
+
+
+
+
+
+
+
登录
+
+
+
+
+
+
+
+
+
+
+<%
+ String rsa_n = (String)request.getAttribute("module");
+ String rsa_e = (String)request.getAttribute("empoent");
+%>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jquery-1.4.1.min.js b/jquery-1.4.1.min.js
new file mode 100644
index 0000000..15b830c
--- /dev/null
+++ b/jquery-1.4.1.min.js
@@ -0,0 +1,167 @@
+/*!
+ * jQuery JavaScript Library v1.4.1
+ * http://jquery.com/
+ *
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Date: Mon Jan 25 19:43:33 2010 -0500
+ */
+(function(z,v){function la(){if(!c.isReady){try{r.documentElement.doScroll("left")}catch(a){setTimeout(la,1);return}c.ready()}}function Ma(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,i){var j=a.length;if(typeof b==="object"){for(var n in b)X(a,n,b[n],f,e,d);return a}if(d!==v){f=!i&&f&&c.isFunction(d);for(n=0;n-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete x[o]}i=c(a.target).closest(f,
+a.currentTarget);m=0;for(s=i.length;m)[^>]*$|^#([\w-]+)$/,Qa=/^.[^:#\[\.,]*$/,Ra=/\S/,Sa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Ta=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,O=navigator.userAgent,
+va=false,P=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,Q=Array.prototype.slice,wa=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Pa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:r;if(a=Ta.exec(a))if(c.isPlainObject(b)){a=[r.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ra([d[1]],
+[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=r.getElementById(d[2])){if(b.id!==d[2])return S.find(a);this.length=1;this[0]=b}this.context=r;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=r;a=r.getElementsByTagName(a)}else return!b||b.jquery?(b||S).find(a):c(b).find(a);else if(c.isFunction(a))return S.ready(a);if(a.selector!==v){this.selector=a.selector;this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a,
+this)},selector:"",jquery:"1.4.1",length:0,size:function(){return this.length},toArray:function(){return Q.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length=0;ba.apply(this,a);return this},each:function(a,b){return c.each(this,
+a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(r,c);else P&&P.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(Q.apply(this,arguments),"slice",Q.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};
+c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,n;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b