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

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

?? biginteger.java

?? 整體思路 用createkey.java 文件來產生秘鑰
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. *//* * @(#)BigInteger.java	1.70 05/08/09 */package java.math;import java.util.Random;import java.io.*;/** * Immutable arbitrary-precision integers.  All operations behave as if * BigIntegers were represented in two's-complement notation (like Java's * primitive integer types).  BigInteger provides analogues to all of Java's * primitive integer operators, and all relevant methods from java.lang.Math. * Additionally, BigInteger provides operations for modular arithmetic, GCD * calculation, primality testing, prime generation, bit manipulation, * and a few other miscellaneous operations. * <p> * Semantics of arithmetic operations exactly mimic those of Java's integer * arithmetic operators, as defined in <i>The Java Language Specification</i>. * For example, division by zero throws an <tt>ArithmeticException</tt>, and * division of a negative by a positive yields a negative (or zero) remainder. * All of the details in the Spec concerning overflow are ignored, as * BigIntegers are made as large as necessary to accommodate the results of an * operation. * <p> * Semantics of shift operations extend those of Java's shift operators * to allow for negative shift distances.  A right-shift with a negative * shift distance results in a left shift, and vice-versa.  The unsigned * right shift operator (&gt;&gt;&gt;) is omitted, as this operation makes * little sense in combination with the "infinite word size" abstraction * provided by this class. * <p> * Semantics of bitwise logical operations exactly mimic those of Java's * bitwise integer operators.  The binary operators (<tt>and</tt>, * <tt>or</tt>, <tt>xor</tt>) implicitly perform sign extension on the shorter * of the two operands prior to performing the operation. * <p> * Comparison operations perform signed integer comparisons, analogous to * those performed by Java's relational and equality operators. * <p> * Modular arithmetic operations are provided to compute residues, perform * exponentiation, and compute multiplicative inverses.  These methods always * return a non-negative result, between <tt>0</tt> and <tt>(modulus - 1)</tt>, * inclusive. * <p> * Bit operations operate on a single bit of the two's-complement * representation of their operand.  If necessary, the operand is sign- * extended so that it contains the designated bit.  None of the single-bit * operations can produce a BigInteger with a different sign from the * BigInteger being operated on, as they affect only a single bit, and the * "infinite word size" abstraction provided by this class ensures that there * are infinitely many "virtual sign bits" preceding each BigInteger. * <p> * For the sake of brevity and clarity, pseudo-code is used throughout the * descriptions of BigInteger methods.  The pseudo-code expression * <tt>(i + j)</tt> is shorthand for "a BigInteger whose value is * that of the BigInteger <tt>i</tt> plus that of the BigInteger <tt>j</tt>." * The pseudo-code expression <tt>(i == j)</tt> is shorthand for * "<tt>true</tt> if and only if the BigInteger <tt>i</tt> represents the same * value as the BigInteger <tt>j</tt>."  Other pseudo-code expressions are * interpreted similarly. * <p> * All methods and constructors in this class throw * <CODE>NullPointerException</CODE> when passed * a null object reference for any input parameter. * * @see     BigDecimal * @version 1.70, 08/09/05 * @author  Josh Bloch * @author  Michael McCloskey * @since JDK1.1 */public class BigInteger extends Number implements Comparable<BigInteger> {    /**     * The signum of this BigInteger: -1 for negative, 0 for zero, or     * 1 for positive.  Note that the BigInteger zero <i>must</i> have     * a signum of 0.  This is necessary to ensures that there is exactly one     * representation for each BigInteger value.     *     * @serial     */    int signum;    /**     * The magnitude of this BigInteger, in <i>big-endian</i> order: the     * zeroth element of this array is the most-significant int of the     * magnitude.  The magnitude must be "minimal" in that the most-significant     * int (<tt>mag[0]</tt>) must be non-zero.  This is necessary to     * ensure that there is exactly one representation for each BigInteger     * value.  Note that this implies that the BigInteger zero has a     * zero-length mag array.     */    int[] mag;    // These "redundant fields" are initialized with recognizable nonsense    // values, and cached the first time they are needed (or never, if they    // aren't needed).    /**     * The bitCount of this BigInteger, as returned by bitCount(), or -1     * (either value is acceptable).     *     * @serial     * @see #bitCount     */    private int bitCount =  -1;    /**     * The bitLength of this BigInteger, as returned by bitLength(), or -1     * (either value is acceptable).     *     * @serial     * @see #bitLength     */    private int bitLength = -1;    /**     * The lowest set bit of this BigInteger, as returned by getLowestSetBit(),     * or -2 (either value is acceptable).     *     * @serial     * @see #getLowestSetBit     */    private int lowestSetBit = -2;    /**     * The index of the lowest-order byte in the magnitude of this BigInteger     * that contains a nonzero byte, or -2 (either value is acceptable).  The     * least significant byte has int-number 0, the next byte in order of     * increasing significance has byte-number 1, and so forth.     *     * @serial     */    private int firstNonzeroByteNum = -2;    /**     * The index of the lowest-order int in the magnitude of this BigInteger     * that contains a nonzero int, or -2 (either value is acceptable).  The     * least significant int has int-number 0, the next int in order of     * increasing significance has int-number 1, and so forth.     */    private int firstNonzeroIntNum = -2;    /**     * This mask is used to obtain the value of an int as if it were unsigned.     */    private final static long LONG_MASK = 0xffffffffL;    //Constructors    /**     * Translates a byte array containing the two's-complement binary     * representation of a BigInteger into a BigInteger.  The input array is     * assumed to be in <i>big-endian</i> byte-order: the most significant     * byte is in the zeroth element.     *     * @param  val big-endian two's-complement binary representation of     *	       BigInteger.     * @throws NumberFormatException <tt>val</tt> is zero bytes long.     */    public BigInteger(byte[] val) {	if (val.length == 0)	    throw new NumberFormatException("Zero length BigInteger");	if (val[0] < 0) {            mag = makePositive(val);	    signum = -1;	} else {	    mag = stripLeadingZeroBytes(val);	    signum = (mag.length == 0 ? 0 : 1);	}    }    /**     * This private constructor translates an int array containing the     * two's-complement binary representation of a BigInteger into a     * BigInteger. The input array is assumed to be in <i>big-endian</i>     * int-order: the most significant int is in the zeroth element.     */    private BigInteger(int[] val) {	if (val.length == 0)	    throw new NumberFormatException("Zero length BigInteger");	if (val[0] < 0) {            mag = makePositive(val);	    signum = -1;	} else {	    mag = trustedStripLeadingZeroInts(val);	    signum = (mag.length == 0 ? 0 : 1);	}    }    /**     * Translates the sign-magnitude representation of a BigInteger into a     * BigInteger.  The sign is represented as an integer signum value: -1 for     * negative, 0 for zero, or 1 for positive.  The magnitude is a byte array     * in <i>big-endian</i> byte-order: the most significant byte is in the     * zeroth element.  A zero-length magnitude array is permissible, and will     * result inin a BigInteger value of 0, whether signum is -1, 0 or 1.     *     * @param  signum signum of the number (-1 for negative, 0 for zero, 1     * 	       for positive).     * @param  magnitude big-endian binary representation of the magnitude of     * 	       the number.     * @throws NumberFormatException <tt>signum</tt> is not one of the three     *	       legal values (-1, 0, and 1), or <tt>signum</tt> is 0 and     *	       <tt>magnitude</tt> contains one or more non-zero bytes.     */    public BigInteger(int signum, byte[] magnitude) {	this.mag = stripLeadingZeroBytes(magnitude);	if (signum < -1 || signum > 1)	    throw(new NumberFormatException("Invalid signum value"));	if (this.mag.length==0) {	    this.signum = 0;	} else {	    if (signum == 0)		throw(new NumberFormatException("signum-magnitude mismatch"));	    this.signum = signum;	}    }    /**     * A constructor for internal use that translates the sign-magnitude     * representation of a BigInteger into a BigInteger. It checks the     * arguments and copies the magnitude so this constructor would be     * safe for external use.     */    private BigInteger(int signum, int[] magnitude) {	this.mag = stripLeadingZeroInts(magnitude);	if (signum < -1 || signum > 1)	    throw(new NumberFormatException("Invalid signum value"));	if (this.mag.length==0) {	    this.signum = 0;	} else {	    if (signum == 0)		throw(new NumberFormatException("signum-magnitude mismatch"));	    this.signum = signum;	}    }    /**     * Translates the String representation of a BigInteger in the specified     * radix into a BigInteger.  The String representation consists of an     * optional minus sign followed by a sequence of one or more digits in the     * specified radix.  The character-to-digit mapping is provided by     * <tt>Character.digit</tt>.  The String may not contain any extraneous     * characters (whitespace, for example).     *     * @param val String representation of BigInteger.     * @param radix radix to be used in interpreting <tt>val</tt>.     * @throws NumberFormatException <tt>val</tt> is not a valid representation     *	       of a BigInteger in the specified radix, or <tt>radix</tt> is     *	       outside the range from {@link Character#MIN_RADIX} to     *	       {@link Character#MAX_RADIX}, inclusive.     * @see    Character#digit     */    public BigInteger(String val, int radix) {	int cursor = 0, numDigits;        int len = val.length();	if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX)	    throw new NumberFormatException("Radix out of range");	if (val.length() == 0)	    throw new NumberFormatException("Zero length BigInteger");	// Check for minus sign	signum = 1;        int index = val.lastIndexOf("-");        if (index != -1) {            if (index == 0) {                if (val.length() == 1)                    throw new NumberFormatException("Zero length BigInteger");                signum = -1;                cursor = 1;            } else {                throw new NumberFormatException("Illegal embedded minus sign");            }        }        // Skip leading zeros and compute number of digits in magnitude	while (cursor < len &&               Character.digit(val.charAt(cursor),radix) == 0)	    cursor++;	if (cursor == len) {	    signum = 0;	    mag = ZERO.mag;	    return;	} else {	    numDigits = len - cursor;	}        // Pre-allocate array of expected size. May be too large but can        // never be too small. Typically exact.        int numBits = (int)(((numDigits * bitsPerDigit[radix]) >>> 10) + 1);        int numWords = (numBits + 31) /32;        mag = new int[numWords];	// Process first (potentially short) digit group	int firstGroupLen = numDigits % digitsPerInt[radix];	if (firstGroupLen == 0)	    firstGroupLen = digitsPerInt[radix];	String group = val.substring(cursor, cursor += firstGroupLen);        mag[mag.length - 1] = Integer.parseInt(group, radix);	if (mag[mag.length - 1] < 0)	    throw new NumberFormatException("Illegal digit");        	// Process remaining digit groups        int superRadix = intRadix[radix];        int groupVal = 0;	while (cursor < val.length()) {	    group = val.substring(cursor, cursor += digitsPerInt[radix]);	    groupVal = Integer.parseInt(group, radix);	    if (groupVal < 0)		throw new NumberFormatException("Illegal digit");            destructiveMulAdd(mag, superRadix, groupVal);	}        // Required for cases where the array was overallocated.        mag = trustedStripLeadingZeroInts(mag);    }    // Constructs a new BigInteger using a char array with radix=10    BigInteger(char[] val) {        int cursor = 0, numDigits;        int len = val.length;	// Check for leading minus sign	signum = 1;	if (val[0] == '-') {	    if (len == 1)		throw new NumberFormatException("Zero length BigInteger");	    signum = -1;	    cursor = 1;	}        // Skip leading zeros and compute number of digits in magnitude	while (cursor < len && Character.digit(val[cursor], 10) == 0)	    cursor++;	if (cursor == len) {	    signum = 0;	    mag = ZERO.mag;	    return;	} else {	    numDigits = len - cursor;	}        // Pre-allocate array of expected size        int numWords;        if (len < 10) {            numWords = 1;        } else {                int numBits = (int)(((numDigits * bitsPerDigit[10]) >>> 10) + 1);            numWords = (numBits + 31) /32;        }        mag = new int[numWords]; 	// Process first (potentially short) digit group	int firstGroupLen = numDigits % digitsPerInt[10];	if (firstGroupLen == 0)	    firstGroupLen = digitsPerInt[10];        mag[mag.length-1] = parseInt(val, cursor,  cursor += firstGroupLen);        	// Process remaining digit groups	while (cursor < len) {	    int groupVal = parseInt(val, cursor, cursor += digitsPerInt[10]);            destructiveMulAdd(mag, intRadix[10], groupVal);	}        mag = trustedStripLeadingZeroInts(mag);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲视频小说图片| 欧美揉bbbbb揉bbbbb| 91浏览器在线视频| 91精品在线观看入口| 久久久久成人黄色影片| 婷婷国产v国产偷v亚洲高清| 懂色av一区二区三区免费看| 欧美一区二区三区四区在线观看| 亚洲视频一区在线| 国产精品66部| 日韩欧美一区二区在线视频| 亚洲美女淫视频| 丰满亚洲少妇av| 日韩欧美国产不卡| 亚洲电影一区二区三区| av激情成人网| 欧美国产日韩精品免费观看| 久久99精品久久久久久国产越南 | 日韩欧美亚洲一区二区| 一区二区在线观看不卡| 成人sese在线| 国产精品美女久久久久高潮| 国产成人免费视频网站高清观看视频| 精品噜噜噜噜久久久久久久久试看| 亚洲国产人成综合网站| 欧美在线短视频| 亚洲免费毛片网站| 91麻豆成人久久精品二区三区| 久久久电影一区二区三区| 久久精品国产精品亚洲综合| 欧美一级爆毛片| 另类小说欧美激情| 精品99999| 国产在线精品一区二区夜色| 亚洲精品一区二区精华| 国产一区二区三区久久悠悠色av | 欧美伦理电影网| 丝瓜av网站精品一区二区| 欧美日韩一区不卡| 日韩精品久久久久久| 在线不卡的av| 国产在线精品一区二区三区不卡 | 国产1区2区3区精品美女| 久久品道一品道久久精品| 国产成人av福利| 国产精品二区一区二区aⅴ污介绍| 成人小视频免费在线观看| 综合av第一页| 欧美伊人久久久久久久久影院| 午夜精品久久久久影视| 欧美一区二区高清| 国产一区二区三区高清播放| 亚洲欧美自拍偷拍色图| 91国偷自产一区二区开放时间 | 婷婷成人激情在线网| 欧美一卡2卡三卡4卡5免费| 国内欧美视频一区二区| 亚洲欧洲成人自拍| 欧美三级在线视频| 韩国在线一区二区| 最新不卡av在线| 91精品国产综合久久精品性色| 国产一区二区三区精品欧美日韩一区二区三区 | 欧美视频中文字幕| 久久99国产精品麻豆| 中文字幕一区二区三区在线播放| 欧美三电影在线| 国产成人高清在线| 日韩激情中文字幕| 国产欧美日韩视频在线观看| 欧日韩精品视频| 国产精品亚洲人在线观看| 亚洲一区二区中文在线| 精品动漫一区二区三区在线观看| 99国产精品视频免费观看| 奇米四色…亚洲| 亚洲免费在线视频一区 二区| 欧美videos中文字幕| 在线观看av一区| 国产成人免费视频网站| 秋霞成人午夜伦在线观看| 一区在线播放视频| 26uuuu精品一区二区| 欧美性受xxxx黑人xyx| 成人免费观看男女羞羞视频| 麻豆成人免费电影| 亚洲黄色性网站| 亚洲国产精品精华液ab| 精品奇米国产一区二区三区| 欧美亚洲一区三区| av亚洲精华国产精华精华| 国产在线看一区| 久久精品国产亚洲aⅴ| 亚洲成人免费在线观看| 中文字幕在线观看不卡| 久久综合九色综合欧美98| 在线不卡a资源高清| 欧美色视频在线| 日本韩国欧美在线| 97久久精品人人做人人爽| 成人午夜在线播放| 国产成人精品免费看| 国产一区二区三区国产| 国模一区二区三区白浆| 久久精品国产免费看久久精品| 日韩专区欧美专区| 亚洲福利视频三区| 亚洲影院免费观看| 亚洲一区在线看| 亚洲最新在线观看| 一区二区三区.www| 亚洲在线成人精品| 视频一区二区国产| 婷婷中文字幕综合| 天天亚洲美女在线视频| 五月天国产精品| 日韩电影在线观看电影| 午夜精品久久久久影视| 免费在线欧美视频| 精品中文字幕一区二区小辣椒| 卡一卡二国产精品 | 国产成人在线视频免费播放| 国产米奇在线777精品观看| 国精品**一区二区三区在线蜜桃| 蜜桃视频在线观看一区| 韩国三级在线一区| 国产69精品久久777的优势| 成人在线一区二区三区| jlzzjlzz国产精品久久| 欧美亚洲丝袜传媒另类| 欧美精品一级二级| 日韩欧美一区中文| 一区二区激情视频| 亚洲成在人线在线播放| 蜜桃视频在线观看一区二区| 国产酒店精品激情| 99国产麻豆精品| 欧美人伦禁忌dvd放荡欲情| 日韩欧美久久一区| 国产三级三级三级精品8ⅰ区| 亚洲视频在线观看三级| 日本视频在线一区| 粉嫩在线一区二区三区视频| 91丝袜美腿高跟国产极品老师| 欧美偷拍一区二区| 久久色在线视频| 亚洲另类色综合网站| 久久99热这里只有精品| 成人av手机在线观看| 777色狠狠一区二区三区| 久久精品欧美一区二区三区不卡| 亚洲人快播电影网| 蜜桃传媒麻豆第一区在线观看| 成人免费视频一区二区| 欧美精品国产精品| 国产精品素人一区二区| 丝袜亚洲另类丝袜在线| 国产成人亚洲综合a∨猫咪| 欧美视频一区二区在线观看| 久久综合久色欧美综合狠狠| 一二三四社区欧美黄| 激情六月婷婷综合| 欧美日韩免费电影| 亚洲欧洲日韩女同| 极品少妇xxxx偷拍精品少妇| 色综合 综合色| 国产亚洲一区二区在线观看| 亚洲va欧美va人人爽| 91丝袜高跟美女视频| 国产亚洲一二三区| 日日骚欧美日韩| 在线免费av一区| 国产精品免费丝袜| 国产在线视频一区二区| 欧美一区二区人人喊爽| 亚洲午夜久久久久久久久电影网| 成人一区二区三区| 久久综合久久久久88| 日本成人中文字幕在线视频 | 日韩网站在线看片你懂的| 亚洲一区二区三区视频在线 | 亚洲一区二区三区三| 成人黄色国产精品网站大全在线免费观看| 欧美人动与zoxxxx乱| 亚洲男人的天堂网| 成人网页在线观看| 国产精品视频看| 风间由美性色一区二区三区| 国产婷婷色一区二区三区| 精品一区二区三区视频在线观看| 67194成人在线观看| 亚洲一区二区三区四区五区中文| 92国产精品观看| 中文字幕亚洲区| www.在线成人| 18欧美亚洲精品| 99视频一区二区| 亚洲婷婷国产精品电影人久久| 成人黄色大片在线观看| 国产精品婷婷午夜在线观看|