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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? sha2.java

?? This is a resource based on j2me embedded,if you dont understand,you can connection with me .
?? JAVA
字號:
/* * @(#)SHA2.java	1.6 06/10/10 * * Copyright  1990-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER *  * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version * 2 only, as published by the Free Software Foundation.  *  * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License version 2 for more details (a copy is * included at /legal/license.txt).  *  * You should have received a copy of the GNU General Public License * version 2 along with this work; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA  *  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa * Clara, CA 95054 or visit www.sun.com if you need additional * information or have any questions.  */package sun.security.provider;import java.security.*;import java.math.BigInteger;/** * This class implements the Secure Hash Algorithm SHA-256 developed by * the National Institute of Standards and Technology along with the * National Security Agency. * * <p>It implements java.security.MessageDigestSpi, and can be used * through Java Cryptography Architecture (JCA), as a pluggable  * MessageDigest implementation. *  * @version     1.6 10/10/06 * @author	Valerie Peng */public class SHA2 extends MessageDigestSpi implements Cloneable {    private static final int LENGTH = 32;    private static final int ITERATION = 64;    private static final int COUNT_MASK = 63; // block size - 1    // Constants for each round    private static final int[] ROUND_CONSTS = {	0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,	0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,	0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,	0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,	0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,	0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,	0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,	0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,	0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,	0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,	0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,	0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,	0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,	0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,	0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,	0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2    };    private int W[] = new int[ITERATION];    private long count = 0;    private int AA, BB, CC, DD, EE, FF, GG, HH;    /**     * logical function ch(x,y,z) as defined in spec:     * @return (x and y) xor ((complement x) and z)     * @param x int     * @param y int     * @param z int     */    private static int lf_ch(int x, int y, int z) {     return (x & y) ^ ((~x) & z);    }    /**     * logical function maj(x,y,z) as defined in spec:     * @return (x and y) xor (x and z) xor (y and z)     * @param x int     * @param y int     * @param z int     */    private static int lf_maj(int x, int y, int z) {     return (x & y) ^ (x & z) ^ (y & z);    }    /**     * logical function R(x,s) - right shift     * @return x right shift for s times     * @param x int     * @param s int     */    private static int lf_R( int x, int s ) {	return (x >>> s);    }    /**     * logical function S(x,s) - right rotation     * @return x circular right shift for s times     * @param x int     * @param s int     */    private static int lf_S(int x, int s) {	return (x >>> s) | (x << (32 - s));    }    /**     * logical function sigma0(x) - xor of results of right rotations     * @return S(x,2) xor S(x,13) xor S(x,22)     * @param x int     */    private static int lf_sigma0(int x) {	return lf_S(x, 2) ^ lf_S(x, 13) ^ lf_S(x, 22);    }    /**     * logical function sigma1(x) - xor of results of right rotations     * @return S(x,6) xor S(x,11) xor S(x,25)     * @param x int     */    private static int lf_sigma1(int x) {	return lf_S( x, 6 ) ^ lf_S( x, 11 ) ^ lf_S( x, 25 );    }    /**     * logical function delta0(x) - xor of results of right shifts/rotations     * @return int     * @param x int     */    private static int lf_delta0(int x) {	return lf_S(x, 7) ^ lf_S(x, 18) ^ lf_R(x, 3);    }    /**     * logical function delta1(x) - xor of results of right shifts/rotations     * @return int     * @param x int     */    private static int lf_delta1(int x) {	return lf_S(x, 17) ^ lf_S(x, 19) ^ lf_R(x, 10);    }    /**     * Creates a SHA2 object.with state (for cloning)      */    private SHA2(SHA2 sha) {	this();	System.arraycopy(sha.W, 0, this.W, 0, W.length);	this.count = sha.count;	this.AA = sha.AA;	this.BB = sha.BB;	this.CC = sha.CC;	this.DD = sha.DD;	this.EE = sha.EE;	this.FF = sha.FF;	this.GG = sha.GG;	this.HH = sha.HH;    }    /**     * Creates a new SHA object.     */    public SHA2() {	init();    }    /**     * @return the length of the digest in bytes     */    protected int engineGetDigestLength() {	return (LENGTH);    }    /**     * Update a byte.     *     * @param b	the byte     */    protected void engineUpdate(byte b) {	update((int)b);    }    private void update(int b)  {	int word;  // index inside this block, i.e. from 0 to 15.	int offset; // offset of this byte inside the word	/* compute word index within the block and bit offset within the word.	   block size is 64 bytes with word size is 4 bytes. offset is in 	   terms of bits */	word = ((int)count & COUNT_MASK) >>> 2;	offset = (~(int)count & 3) << 3;	// clear the byte inside W[word] and then 'or' it with b's byte value	W[word] = (W[word] & ~(0xff << offset)) | ((b & 0xff) << offset);	/* If this is the last byte of a block, compute the partial hash */	if (((int)count & COUNT_MASK) == COUNT_MASK) {	    computeBlock();	}	count++;    }    	    /**     * Update a buffer.     *     * @param b	the data to be updated.     * @param off the start offset in the data     * @param len the number of bytes to be updated.     */    protected void engineUpdate(byte b[], int off, int len) {	int word;	int offset;	if ((off < 0) || (len < 0) || (off + len > b.length))	    throw new ArrayIndexOutOfBoundsException();	// Use single writes until integer aligned	while ((len > 0) &&	       ((int)count & 3) != 0) {	    engineUpdate(b[off]);	    off++;	    len--;	}    	/* Assemble groups of 4 bytes to be inserted in integer array */	while (len >= 4) {	    word = ((int)count & COUNT_MASK) >> 2;	    W[word] = ((b[off] & 0xff) << 24) |		((b[off+1] & 0xff) << 16) |		((b[off+2] & 0xff) << 8) |		((b[off+3] & 0xff) );	    	    count += 4;	    if (((int)count & COUNT_MASK) == 0) {		computeBlock();	    }	    len -= 4;	    off += 4;	}		/* Use single writes for last few bytes */	while (len > 0) {	    engineUpdate(b[off++]);	    len--;	}    }        /**     * Resets the buffers and hash value to start a new hash.     */    private void init() {	AA = 0x6a09e667;	BB = 0xbb67ae85;	CC = 0x3c6ef372;	DD = 0xa54ff53a;	EE = 0x510e527f;	FF = 0x9b05688c;	GG = 0x1f83d9ab;	HH = 0x5be0cd19;	for (int i = 0; i < ITERATION; i++)	    W[i] = 0;	count = 0;    }    /**     * Resets the buffers and hash value to start a new hash.     */    protected void engineReset() {	init();    }        /**     * Computes the final hash and returns the final value as a     * byte[32] array. The object is reset to be ready for further     * use, as specified in the JavaSecurity MessageDigest     * specification.       * @return the digest     */    protected byte[] engineDigest() {	byte hashvalue[] = new byte[LENGTH];	try {	    int outLen = engineDigest(hashvalue, 0, hashvalue.length);	} catch (DigestException e) {	    throw new InternalError("");	}	return hashvalue;    }    /**     * Computes the final hash and places the final value in the     * specified array. The object is reset to be ready for further     * use, as specified in java.security.MessageDigest javadoc     * specification.     * @param hashvalue buffer to hold the digest     * @param offset offset for storing the digest     * @param len length of the buffer     * @return length of the digest in bytes     */    protected int engineDigest(byte[] hashvalue, int offset, int len)	throws DigestException {	if (len < LENGTH) {	    throw new DigestException("partial digests not returned");	}	if (hashvalue.length - offset < LENGTH) {	    throw new DigestException("insufficient space in the output " +				      "buffer to store the digest");	}	/* The input length in bits before padding occurs */	long inputLength = count << 3;			update(0x80);	/* Pad with zeros until overall length is a multiple of 448 */	while ((int)(count & COUNT_MASK) != 56) {	    update(0);	}	W[14] = (int)(inputLength >>> 32);	W[15] = (int)(inputLength & 0xffffffff);	count += 8;	computeBlock();	// Copy out the result	hashvalue[offset + 0] = (byte)(AA >>> 24);	hashvalue[offset + 1] = (byte)(AA >>> 16);	hashvalue[offset + 2] = (byte)(AA >>> 8);	hashvalue[offset + 3] = (byte)(AA >>> 0);	hashvalue[offset + 4] = (byte)(BB >>> 24);	hashvalue[offset + 5] = (byte)(BB >>> 16);	hashvalue[offset + 6] = (byte)(BB >>> 8);	hashvalue[offset + 7] = (byte)(BB >>> 0);	hashvalue[offset + 8] = (byte)(CC >>> 24);	hashvalue[offset + 9] = (byte)(CC >>> 16);	hashvalue[offset + 10] = (byte)(CC >>> 8);	hashvalue[offset + 11] = (byte)(CC >>> 0);	hashvalue[offset + 12] = (byte)(DD >>> 24);	hashvalue[offset + 13] = (byte)(DD >>> 16);	hashvalue[offset + 14] = (byte)(DD >>> 8);	hashvalue[offset + 15] = (byte)(DD >>> 0);	hashvalue[offset + 16] = (byte)(EE >>> 24);	hashvalue[offset + 17] = (byte)(EE >>> 16);	hashvalue[offset + 18] = (byte)(EE >>> 8);	hashvalue[offset + 19] = (byte)(EE >>> 0);	hashvalue[offset + 20] = (byte)(FF >>> 24);	hashvalue[offset + 21] = (byte)(FF >>> 16);	hashvalue[offset + 22] = (byte)(FF >>> 8);	hashvalue[offset + 23] = (byte)(FF >>> 0);	hashvalue[offset + 24] = (byte)(GG >>> 24);	hashvalue[offset + 25] = (byte)(GG >>> 16);	hashvalue[offset + 26] = (byte)(GG >>> 8);	hashvalue[offset + 27] = (byte)(GG >>> 0);	hashvalue[offset + 28] = (byte)(HH >>> 24);	hashvalue[offset + 29] = (byte)(HH >>> 16);	hashvalue[offset + 30] = (byte)(HH >>> 8);	hashvalue[offset + 31] = (byte)(HH >>> 0);	engineReset();		// remove the evidence		return LENGTH;    }        /**     * Compute the hash for the current block and stores the results     * in internal variable AA, BB, CC, DD, EE, FF, GG, HH     */    private void computeBlock() {	int T1, T2, a, b, c, d, e, f, g, h;		// The first 16 ints are from the byte stream, compute the rest of	// the W[]'s	for (int t = 16; t < ITERATION; t++) {	    W[t] = lf_delta1(W[t-2]) + W[t-7] + lf_delta0(W[t-15]) 		   + W[t-16];	}		a = AA;	b = BB;	c = CC;	d = DD;	e = EE;	f = FF;	g = GG;	h = HH;	for (int i = 0; i < ITERATION; i++) {	    T1 = h + lf_sigma1(e) + lf_ch(e,f,g) + ROUND_CONSTS[i] + W[i];	    T2 = lf_sigma0(a) + lf_maj(a,b,c);	    h = g;	    g = f;	    f = e;	    e = d + T1;	    d = c;	    c = b;	    b = a;	    a = T1 + T2;	}	AA += a;	BB += b;	CC += c;	DD += d;	EE += e;	FF += f;	GG += g;	HH += h;    }    /*     * Clones this object.     */    public Object clone() {	SHA2 that = null;	that = (SHA2) new SHA2(this);	return that;    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人a级片| 亚洲精品亚洲人成人网在线播放| 日韩高清一区二区| 欧美一区二区三区视频在线| 首页国产欧美久久| 日韩三级在线免费观看| 国产在线一区观看| 国产欧美日韩三级| 色av综合在线| 亚洲成人tv网| 精品少妇一区二区三区免费观看| 国产在线不卡一区| ...av二区三区久久精品| 色久优优欧美色久优优| 午夜免费久久看| 精品国产1区二区| 99视频在线观看一区三区| 亚洲人123区| 日韩一区二区三区电影在线观看 | 国产精品色哟哟网站| 91麻豆国产在线观看| 亚洲国产va精品久久久不卡综合| 欧美理论在线播放| 国产成人综合在线| 亚洲电影在线免费观看| 精品国产一区久久| 色嗨嗨av一区二区三区| 蜜臀av性久久久久蜜臀av麻豆| 国产日产欧美一区二区三区| 色成人在线视频| 欧美中文字幕一区二区三区 | 欧美日韩一区二区三区在线| 麻豆国产91在线播放| 国产精品国产三级国产| 欧美一区二区国产| 波多野结衣欧美| 蜜臂av日日欢夜夜爽一区| 国产精品久久久久永久免费观看 | 亚洲精选视频免费看| 日韩欧美电影一二三| 99精品热视频| 久久99精品一区二区三区三区| ㊣最新国产の精品bt伙计久久| 3d成人h动漫网站入口| 不卡欧美aaaaa| 麻豆91在线观看| 亚洲自拍另类综合| 国产人成亚洲第一网站在线播放 | 欧美性大战久久久久久久蜜臀 | 国产大陆亚洲精品国产| 午夜精品在线视频一区| 中文字幕亚洲不卡| 久久婷婷色综合| 欧美一二三区在线| 欧美日韩专区在线| 99精品久久久久久| 国产乱子伦视频一区二区三区| 亚洲一区在线免费观看| 国产精品久久久久永久免费观看| 欧美电影精品一区二区| 欧美精品成人一区二区三区四区| 国产福利精品一区| 久久99久久久欧美国产| 视频一区视频二区中文| 一区二区三区四区精品在线视频| 中文字幕欧美激情一区| 精品久久99ma| 日韩视频一区二区三区| 欧美一区二区福利在线| 7777精品伊人久久久大香线蕉完整版 | 亚洲电影一区二区三区| 亚洲人成网站精品片在线观看| 国产欧美精品在线观看| 久久免费电影网| 精品国产一区二区三区四区四 | 337p亚洲精品色噜噜| 欧美日韩三级一区二区| 91福利精品第一导航| 色综合久久久久| 一道本成人在线| 日本高清不卡视频| 在线免费观看成人短视频| 色婷婷综合久久久中文一区二区| a在线欧美一区| 色婷婷久久久久swag精品| 99热国产精品| 一本久道中文字幕精品亚洲嫩| 99久久99久久久精品齐齐| 91啪亚洲精品| 欧美日韩亚州综合| 日韩视频在线你懂得| 久久婷婷国产综合精品青草| 久久一日本道色综合| 国产日韩欧美综合在线| 国产精品久久久久久妇女6080| 中文字幕日本不卡| 亚洲一区在线观看视频| 视频在线在亚洲| 国产精品一区二区三区四区| 成人丝袜高跟foot| 欧美综合一区二区| 日韩精品一区二区三区在线观看 | 2019国产精品| 亚洲同性同志一二三专区| 一个色在线综合| 麻豆精品一区二区三区| 国产麻豆成人精品| 97国产一区二区| 欧美久久一区二区| 国产亚洲成av人在线观看导航| 中文字幕第一区| 久久精工是国产品牌吗| 国产综合色精品一区二区三区| 成人激情电影免费在线观看| 欧洲一区二区av| 亚洲精品一区在线观看| 18成人在线视频| 麻豆极品一区二区三区| 成人av第一页| 在线不卡中文字幕| 国产精品免费aⅴ片在线观看| 亚洲午夜电影网| 国产精品一级二级三级| 欧美三区在线视频| 亚洲国产精品精华液2区45| 亚洲成人激情社区| voyeur盗摄精品| 欧美成人国产一区二区| 一区二区三区成人在线视频| 国内外成人在线| 欧美精品在线观看一区二区| 中文字幕精品一区二区三区精品| 丝袜美腿亚洲色图| 91麻豆swag| 国产视频一区在线观看| 视频精品一区二区| 91浏览器在线视频| 国产欧美一区二区精品忘忧草| 亚洲成人免费视| 色综合久久久久综合体| 久久久91精品国产一区二区三区| 无码av免费一区二区三区试看| 91天堂素人约啪| 久久女同性恋中文字幕| 日韩av中文字幕一区二区三区| 91麻豆国产精品久久| 国产精品免费aⅴ片在线观看| 久久精品噜噜噜成人av农村| 欧美特级限制片免费在线观看| 久久99精品国产麻豆婷婷洗澡| 在线观看不卡视频| 亚洲精品成人天堂一二三| 国产不卡视频在线播放| 精品久久久久久综合日本欧美| 午夜私人影院久久久久| 色屁屁一区二区| 亚洲免费在线看| 99re热这里只有精品视频| 欧美国产精品一区二区三区| 国产一区二区三区免费观看| 日韩美女视频在线| 日本不卡一区二区| 91精品福利在线一区二区三区| 亚洲国产wwwccc36天堂| 欧洲视频一区二区| 亚洲综合一区二区| 欧美天堂亚洲电影院在线播放| 亚洲精品视频一区二区| 色噜噜狠狠色综合欧洲selulu| 一区视频在线播放| 99国内精品久久| 亚洲欧美另类综合偷拍| 一本色道亚洲精品aⅴ| 亚洲激情欧美激情| 精品视频免费在线| 丝袜亚洲另类欧美| 日韩精品一区在线| 国产成人啪午夜精品网站男同| 国产日本欧美一区二区| 波多野结衣一区二区三区| 亚洲黄网站在线观看| 欧洲视频一区二区| 五月婷婷激情综合| 日韩精品在线一区| 国产成人精品免费一区二区| 国产精品网曝门| 在线视频观看一区| 亚洲福利电影网| 精品国产一区二区三区av性色| 美女视频第一区二区三区免费观看网站| 日韩三级伦理片妻子的秘密按摩| 国产在线不卡一卡二卡三卡四卡| 中文字幕av一区二区三区免费看 | 色偷偷一区二区三区| 国产精品麻豆欧美日韩ww| 91视频你懂的| 香蕉影视欧美成人| 精品久久人人做人人爱| 成人黄色小视频在线观看| 成人app软件下载大全免费|