亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? biginteger.java

?? 整體思路 用createkey.java 文件來產生秘鑰
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
            return 0;        // Algorithm and comments adapted from Colin Plumb's C library.	int j = 1;	int u = n.mag[n.mag.length-1];        // Make p positive        if (p < 0) {            p = -p;            int n8 = u & 7;            if ((n8 == 3) || (n8 == 7))                j = -j; // 3 (011) or 7 (111) mod 8        }	// Get rid of factors of 2 in p	while ((p & 3) == 0)            p >>= 2;	if ((p & 1) == 0) {            p >>= 1;            if (((u ^ (u>>1)) & 2) != 0)                j = -j;	// 3 (011) or 5 (101) mod 8	}	if (p == 1)	    return j;	// Then, apply quadratic reciprocity	if ((p & u & 2) != 0)	// p = u = 3 (mod 4)?	    j = -j;	// And reduce u mod p	u = n.mod(BigInteger.valueOf(p)).intValue();	// Now compute Jacobi(u,p), u < p	while (u != 0) {            while ((u & 3) == 0)                u >>= 2;            if ((u & 1) == 0) {                u >>= 1;                if (((p ^ (p>>1)) & 2) != 0)                    j = -j;	// 3 (011) or 5 (101) mod 8            }            if (u == 1)                return j;            // Now both u and p are odd, so use quadratic reciprocity            assert (u < p);            int t = u; u = p; p = t;            if ((u & p & 2) != 0) // u = p = 3 (mod 4)?                j = -j;            // Now u >= p, so it can be reduced            u %= p;	}	return 0;    }    private static BigInteger lucasLehmerSequence(int z, BigInteger k, BigInteger n) {        BigInteger d = BigInteger.valueOf(z);        BigInteger u = ONE; BigInteger u2;        BigInteger v = ONE; BigInteger v2;        for (int i=k.bitLength()-2; i>=0; i--) {            u2 = u.multiply(v).mod(n);            v2 = v.square().add(d.multiply(u.square())).mod(n);            if (v2.testBit(0)) {                v2 = n.subtract(v2);                v2.signum = - v2.signum;            }            v2 = v2.shiftRight(1);            u = u2; v = v2;            if (k.testBit(i)) {                u2 = u.add(v).mod(n);                if (u2.testBit(0)) {                    u2 = n.subtract(u2);                    u2.signum = - u2.signum;                }                u2 = u2.shiftRight(1);                                v2 = v.add(d.multiply(u)).mod(n);                if (v2.testBit(0)) {                    v2 = n.subtract(v2);                    v2.signum = - v2.signum;                }                v2 = v2.shiftRight(1);                u = u2; v = v2;            }        }        return u;    }    /**     * Returns true iff this BigInteger passes the specified number of     * Miller-Rabin tests. This test is taken from the DSA spec (NIST FIPS     * 186-2).     *     * The following assumptions are made:     * This BigInteger is a positive, odd number greater than 2.     * iterations<=50.     */    private boolean passesMillerRabin(int iterations) {	// Find a and m such that m is odd and this == 1 + 2**a * m        BigInteger thisMinusOne = this.subtract(ONE);	BigInteger m = thisMinusOne;	int a = m.getLowestSetBit();	m = m.shiftRight(a);	// Do the tests        Random rnd = new Random();	for (int i=0; i<iterations; i++) {	    // Generate a uniform random on (1, this)	    BigInteger b;	    do {		b = new BigInteger(this.bitLength(), rnd);	    } while (b.compareTo(ONE) <= 0 || b.compareTo(this) >= 0);	    int j = 0;	    BigInteger z = b.modPow(m, this);	    while(!((j==0 && z.equals(ONE)) || z.equals(thisMinusOne))) {		if (j>0 && z.equals(ONE) || ++j==a)		    return false;		z = z.modPow(TWO, this);	    }	}	return true;    }    /**     * This private constructor differs from its public cousin     * with the arguments reversed in two ways: it assumes that its     * arguments are correct, and it doesn't copy the magnitude array.     */    private BigInteger(int[] magnitude, int signum) {	this.signum = (magnitude.length==0 ? 0 : signum);	this.mag = magnitude;    }    /**     * This private constructor is for internal use and assumes that its     * arguments are correct.     */    private BigInteger(byte[] magnitude, int signum) {	this.signum = (magnitude.length==0 ? 0 : signum);        this.mag = stripLeadingZeroBytes(magnitude);    }    /**     * This private constructor is for internal use in converting     * from a MutableBigInteger object into a BigInteger.     */    BigInteger(MutableBigInteger val, int sign) {        if (val.offset > 0 || val.value.length != val.intLen) {            mag = new int[val.intLen];            for(int i=0; i<val.intLen; i++)                mag[i] = val.value[val.offset+i];        } else {            mag = val.value;        }	this.signum = (val.intLen == 0) ? 0 : sign;    }    //Static Factory Methods    /**     * Returns a BigInteger whose value is equal to that of the     * specified <code>long</code>.  This "static factory method" is     * provided in preference to a (<code>long</code>) constructor     * because it allows for reuse of frequently used BigIntegers.     *     * @param  val value of the BigInteger to return.     * @return a BigInteger with the specified value.     */    public static BigInteger valueOf(long val) {	// If -MAX_CONSTANT < val < MAX_CONSTANT, return stashed constant	if (val == 0)	    return ZERO;	if (val > 0 && val <= MAX_CONSTANT)	    return posConst[(int) val];	else if (val < 0 && val >= -MAX_CONSTANT)	    return negConst[(int) -val];	return new BigInteger(val);    }    /**     * Constructs a BigInteger with the specified value, which may not be zero.     */    private BigInteger(long val) {        if (val < 0) {            signum = -1;            val = -val;        } else {            signum = 1;        }        int highWord = (int)(val >>> 32);        if (highWord==0) {            mag = new int[1];            mag[0] = (int)val;        } else {            mag = new int[2];            mag[0] = highWord;            mag[1] = (int)val;        }    }    /**     * Returns a BigInteger with the given two's complement representation.     * Assumes that the input array will not be modified (the returned     * BigInteger will reference the input array if feasible).     */    private static BigInteger valueOf(int val[]) {        return (val[0]>0 ? new BigInteger(val, 1) : new BigInteger(val));    }    // Constants    /**     * Initialize static constant array when class is loaded.     */    private final static int MAX_CONSTANT = 16;    private static BigInteger posConst[] = new BigInteger[MAX_CONSTANT+1];    private static BigInteger negConst[] = new BigInteger[MAX_CONSTANT+1];    static {	for (int i = 1; i <= MAX_CONSTANT; i++) {	    int[] magnitude = new int[1];	    magnitude[0] = (int) i;	    posConst[i] = new BigInteger(magnitude,  1);	    negConst[i] = new BigInteger(magnitude, -1);	}    }    /**     * The BigInteger constant zero.     *     * @since   1.2     */    public static final BigInteger ZERO = new BigInteger(new int[0], 0);    /**     * The BigInteger constant one.     *     * @since   1.2     */    public static final BigInteger ONE = valueOf(1);    /**     * The BigInteger constant two.  (Not exported.)     */    private static final BigInteger TWO = valueOf(2);    /**     * The BigInteger constant ten.     *     * @since   1.5     */    public static final BigInteger TEN = valueOf(10);    // Arithmetic Operations    /**     * Returns a BigInteger whose value is <tt>(this + val)</tt>.     *     * @param  val value to be added to this BigInteger.     * @return <tt>this + val</tt>     */    public BigInteger add(BigInteger val) {        int[] resultMag;	if (val.signum == 0)            return this;	if (signum == 0)	    return val;	if (val.signum == signum)            return new BigInteger(add(mag, val.mag), signum);        int cmp = intArrayCmp(mag, val.mag);        if (cmp==0)            return ZERO;        resultMag = (cmp>0 ? subtract(mag, val.mag)                           : subtract(val.mag, mag));        resultMag = trustedStripLeadingZeroInts(resultMag);        return new BigInteger(resultMag, cmp*signum);    }    /**     * Adds the contents of the int arrays x and y. This method allocates     * a new int array to hold the answer and returns a reference to that     * array.     */    private static int[] add(int[] x, int[] y) {        // If x is shorter, swap the two arrays        if (x.length < y.length) {            int[] tmp = x;            x = y;            y = tmp;        }        int xIndex = x.length;        int yIndex = y.length;        int result[] = new int[xIndex];        long sum = 0;        // Add common parts of both numbers        while(yIndex > 0) {            sum = (x[--xIndex] & LONG_MASK) +                   (y[--yIndex] & LONG_MASK) + (sum >>> 32);            result[xIndex] = (int)sum;        }        // Copy remainder of longer number while carry propagation is required        boolean carry = (sum >>> 32 != 0);        while (xIndex > 0 && carry)            carry = ((result[--xIndex] = x[xIndex] + 1) == 0);        // Copy remainder of longer number        while (xIndex > 0)            result[--xIndex] = x[xIndex];        // Grow result if necessary        if (carry) {            int newLen = result.length + 1;            int temp[] = new int[newLen];            for (int i = 1; i<newLen; i++)                temp[i] = result[i-1];            temp[0] = 0x01;            result = temp;        }        return result;    }    /**     * Returns a BigInteger whose value is <tt>(this - val)</tt>.     *     * @param  val value to be subtracted from this BigInteger.     * @return <tt>this - val</tt>     */    public BigInteger subtract(BigInteger val) {        int[] resultMag;	if (val.signum == 0)            return this;	if (signum == 0)	    return val.negate();	if (val.signum != signum)            return new BigInteger(add(mag, val.mag), signum);        int cmp = intArrayCmp(mag, val.mag);        if (cmp==0)            return ZERO;        resultMag = (cmp>0 ? subtract(mag, val.mag)                           : subtract(val.mag, mag));        resultMag = trustedStripLeadingZeroInts(resultMag);        return new BigInteger(resultMag, cmp*signum);    }    /**     * Subtracts the contents of the second int arrays (little) from the     * first (big).  The first int array (big) must represent a larger number     * than the second.  This method allocates the space necessary to hold the     * answer.     */    private static int[] subtract(int[] big, int[] little) {        int bigIndex = big.length;        int result[] = new int[bigIndex];        int littleIndex = little.length;        long difference = 0;        // Subtract common parts of both numbers        while(littleIndex > 0) {            difference = (big[--bigIndex] & LONG_MASK) -                          (little[--littleIndex] & LONG_MASK) +                         (difference >> 32);            result[bigIndex] = (int)difference;        }        // Subtract remainder of longer number while borrow propagates        boolean borrow = (difference >> 32 != 0);        while (bigIndex > 0 && borrow)            borrow = ((result[--bigIndex] = big[bigIndex] - 1) == -1);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本欧洲一区二区| 日韩三级视频在线观看| 不卡视频一二三| 国产精品自拍av| 国产电影一区在线| 国产成人免费在线观看不卡| 国产综合久久久久久久久久久久| 久久91精品国产91久久小草| 久久精品国产精品亚洲红杏| 蜜臀久久99精品久久久久宅男| 日本强好片久久久久久aaa| 理论电影国产精品| 国产大陆精品国产| 99国产精品视频免费观看| 国产精品美女久久福利网站| 欧美国产日韩a欧美在线观看| 中文字幕欧美三区| 亚洲三级在线免费观看| 亚洲一二三区视频在线观看| 午夜精品久久久久久久| 精品一二线国产| 成人免费视频网站在线观看| 色婷婷国产精品综合在线观看| 一本大道久久精品懂色aⅴ| 欧美专区亚洲专区| 日韩美女一区二区三区四区| 久久久99精品免费观看不卡| 国产精品人人做人人爽人人添| 亚洲三级视频在线观看| 午夜不卡在线视频| 国产精品系列在线观看| 96av麻豆蜜桃一区二区| 欧美日韩国产精品成人| 久久久久国产一区二区三区四区 | 在线欧美日韩国产| 欧美人与禽zozo性伦| 亚洲精品一区二区三区蜜桃下载| 中国色在线观看另类| 亚洲在线一区二区三区| 久久精品国产亚洲aⅴ| 91在线观看美女| 69久久夜色精品国产69蝌蚪网| 久久久精品tv| 亚洲电影在线播放| 国产乱码精品一区二区三区av| 91一区二区三区在线播放| 欧美一区二区视频观看视频 | 久久成人综合网| 99这里都是精品| 91精品国产乱| 亚洲美女视频在线| 国产美女精品在线| 777午夜精品视频在线播放| 国产情人综合久久777777| 午夜成人在线视频| 99久久99久久综合| 久久这里只有精品视频网| 一区二区三区在线看| 精久久久久久久久久久| 色婷婷av久久久久久久| 久久久亚洲高清| 日韩电影在线观看电影| 91色九色蝌蚪| 日本一区二区免费在线观看视频| 亚洲3atv精品一区二区三区| 99在线精品免费| 久久久久久黄色| 免费国产亚洲视频| 欧洲精品中文字幕| 风间由美性色一区二区三区| 91精品国产综合久久精品图片| 国产精品青草综合久久久久99| 美女视频一区二区| 911精品产国品一二三产区| 亚洲欧洲成人自拍| 国产高清精品在线| 日韩欧美一区在线观看| 午夜精品一区在线观看| 91久久香蕉国产日韩欧美9色| 欧美激情一区在线观看| 激情成人午夜视频| 日韩精品一区二区三区在线观看| 亚洲超碰97人人做人人爱| 色婷婷综合久久久中文字幕| 国产精品久久久一本精品| 国产不卡视频在线播放| 精品国一区二区三区| 麻豆免费看一区二区三区| 欧美三级日韩三级国产三级| 怡红院av一区二区三区| 色综合色狠狠综合色| 中文字幕一区二区三| 成人av先锋影音| 中文文精品字幕一区二区| 国产一区二区三区高清播放| 亚洲精品在线观看视频| 久久99久久久久久久久久久| 日韩一区二区在线看| 麻豆成人91精品二区三区| 日韩一级免费观看| 看电影不卡的网站| 精品伦理精品一区| 国产一区不卡在线| 国产亚洲精品7777| 国产成人免费网站| 国产精品你懂的在线| heyzo一本久久综合| 日韩一区日韩二区| 色综合一区二区三区| 一区二区三区欧美亚洲| 欧美色爱综合网| 日本欧美韩国一区三区| 精品久久国产字幕高潮| 国产精品一品二品| 中文字幕在线观看不卡视频| 91看片淫黄大片一级在线观看| 亚洲乱码中文字幕综合| 欧美日韩精品电影| 日本成人在线网站| 久久先锋资源网| www.亚洲免费av| 亚洲综合在线观看视频| 欧美日本在线播放| 久久精品国产澳门| 国产精品毛片高清在线完整版| 99久久久久久99| 午夜精品久久久久久不卡8050| 91精品国产高清一区二区三区蜜臀| 久久精品久久久精品美女| 国产欧美视频一区二区三区| 一本到三区不卡视频| 日韩经典一区二区| 国产91丝袜在线播放| 亚洲欧美在线视频观看| 欧美日韩午夜在线视频| 国模娜娜一区二区三区| 亚洲欧洲国产日韩| 91精品中文字幕一区二区三区| 国产一区二区毛片| 亚洲男女毛片无遮挡| 3d动漫精品啪啪1区2区免费| 国产成人免费视频网站高清观看视频| 亚洲视频资源在线| 91精品婷婷国产综合久久性色| 狠狠v欧美v日韩v亚洲ⅴ| 亚洲精品视频自拍| 日韩一区二区在线看| 99在线热播精品免费| 蜜臀99久久精品久久久久久软件| 欧美激情中文不卡| 欧美二区在线观看| 成人av综合在线| 免费成人你懂的| 夜夜嗨av一区二区三区四季av| 欧美精品一区二区三区久久久| 色综合色狠狠天天综合色| 精品伊人久久久久7777人| 亚洲激情图片小说视频| 精品精品国产高清一毛片一天堂| 一本大道综合伊人精品热热| 韩国一区二区在线观看| 亚洲高清一区二区三区| 中日韩av电影| 2欧美一区二区三区在线观看视频| 日本高清免费不卡视频| 国产乱码精品一品二品| 午夜亚洲国产au精品一区二区| 中文字幕免费观看一区| 欧美一区二区三区在线电影| 91免费看`日韩一区二区| 国产精品123区| 麻豆中文一区二区| 亚洲国产aⅴ成人精品无吗| 中文字幕一区二区三区在线观看 | 色噜噜久久综合| 国产一区二区三区免费播放| 天天操天天干天天综合网| 亚洲欧美日韩电影| 粉嫩欧美一区二区三区高清影视 | 黑人精品欧美一区二区蜜桃| 亚洲国产一区二区在线播放| 国产精品美女久久久久av爽李琼| 日韩欧美电影一二三| 欧美男同性恋视频网站| 在线观看日韩电影| 91色porny在线视频| 白白色亚洲国产精品| 丁香另类激情小说| 国产精品正在播放| 韩国女主播一区| 蜜桃精品视频在线观看| 日韩精品每日更新| 婷婷久久综合九色综合伊人色| 亚洲欧美国产毛片在线| 日韩美女啊v在线免费观看| 欧美国产一区在线| 国产精品理论片| 国产精品天天看| 国产精品电影一区二区| 欧美极品xxx|