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

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

?? eax.java

?? linux下建立JAVA虛擬機(jī)的源碼KAFFE
?? JAVA
字號(hào):
/* EAX.java --    Copyright (C) 2004, 2006 Free Software Foundation, Inc.This file is a part of GNU Classpath.GNU Classpath is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or (atyour option) any later version.GNU Classpath is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNUGeneral Public License for more details.You should have received a copy of the GNU General Public Licensealong with GNU Classpath; if not, write to the Free SoftwareFoundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301USALinking this library statically or dynamically with other modules ismaking a combined work based on this library.  Thus, the terms andconditions of the GNU General Public License cover the wholecombination.As a special exception, the copyright holders of this library give youpermission to link this library with independent modules to produce anexecutable, regardless of the license terms of these independentmodules, and to copy and distribute the resulting executable underterms of your choice, provided that you also meet, for each linkedindependent module, the terms and conditions of the license of thatmodule.  An independent module is a module which is not derived fromor based on this library.  If you modify this library, you may extendthis exception to your version of the library, but you are notobligated to do so.  If you do not wish to do so, delete thisexception statement from your version.  */package gnu.javax.crypto.mode;import gnu.java.security.Registry;import gnu.javax.crypto.cipher.IBlockCipher;import gnu.javax.crypto.mac.IMac;import gnu.javax.crypto.mac.MacFactory;import java.security.InvalidKeyException;import java.util.Arrays;import java.util.Collections;import java.util.HashMap;import java.util.Iterator;import java.util.Map;/** * <p>A conventional two-pass authenticated-encrypted mode, EAX. EAX is a * <i>Authenticated Encryption with Additional Data</i> (<b>AEAD</b>) scheme, * which provides protection and authentication for the message, and provides * authentication of an (optional) header. EAX is composed of the counter mode * (CTR) and the one-key CBC MAC (OMAC). * * <p>This class makes full use of the {@link IAuthenticatedMode} interface, * that is, all methods of both {@link IMode} and {@link IMac} can be used * as specified in the {@link IAuthenticatedMode} interface. * * <p>References:</p> * <ol> * <li>M. Bellare, P. Rogaway, and D. Wagner; <a * href="http://www.cs.berkeley.edu/~daw/papers/eprint-short-ae.pdf">A * Conventional Authenticated-Encryption Mode</a>.</li> * </ol> */public class EAX implements IAuthenticatedMode{  // Constants and fields.  // ------------------------------------------------------------------------  /** The tag size, in bytes. */  private int tagSize;  /** The nonce OMAC instance. */  private IMac nonceOmac;  /** The header OMAC instance. */  private IMac headerOmac;  /** The message OMAC instance. */  private IMac msgOmac;  /** The CTR instance. */  private IMode ctr;  /** The direction state (encrypting or decrypting). */  private int state;  /** Whether we're initialized or not. */  private boolean init;  /** The cipher block size. */  private int cipherBlockSize;  /** The cipher. */  private IBlockCipher cipher;  /** The [t]_n array. */  private byte[] t_n;  private static boolean valid = false;  // Constructor.  // ------------------------------------------------------------------------  public EAX(IBlockCipher cipher, int cipherBlockSize)  {    this.cipher = cipher;    this.cipherBlockSize = cipherBlockSize;    String name = cipher.name();    int i = name.indexOf('-');    if (i >= 0)      {        name = name.substring(0, i);      }    String omacname = Registry.OMAC_PREFIX + name;    nonceOmac = MacFactory.getInstance(omacname);    headerOmac = MacFactory.getInstance(omacname);    msgOmac = MacFactory.getInstance(omacname);    ctr = ModeFactory.getInstance(Registry.CTR_MODE, cipher, cipherBlockSize);    t_n = new byte[cipherBlockSize];    init = false;  }  // IMode instance methods.  // ------------------------------------------------------------------------  public Object clone()  {    return new EAX((IBlockCipher) cipher.clone(), cipherBlockSize);  }  public String name()  {    return Registry.EAX_MODE + "(" + cipher.name() + ")";  }  public int defaultBlockSize()  {    return ctr.defaultBlockSize();  }  public int defaultKeySize()  {    return ctr.defaultKeySize();  }  public Iterator blockSizes()  {    return ctr.blockSizes();  }  public Iterator keySizes()  {    return ctr.keySizes();  }  public void init(Map attrib) throws InvalidKeyException  {    byte[] nonce = (byte[]) attrib.get(IV);    if (nonce == null)      {        throw new IllegalArgumentException("no nonce provided");      }    byte[] key = (byte[]) attrib.get(KEY_MATERIAL);    if (key == null)      {        throw new IllegalArgumentException("no key provided");      }    Arrays.fill(t_n, (byte) 0);    nonceOmac.reset();    nonceOmac.init(Collections.singletonMap(MAC_KEY_MATERIAL, key));    nonceOmac.update(t_n, 0, t_n.length);    nonceOmac.update(nonce, 0, nonce.length);    byte[] N = nonceOmac.digest();    nonceOmac.reset();    nonceOmac.update(t_n, 0, t_n.length);    nonceOmac.update(nonce, 0, nonce.length);    t_n[t_n.length - 1] = 1;    headerOmac.reset();    headerOmac.init(Collections.singletonMap(MAC_KEY_MATERIAL, key));    headerOmac.update(t_n, 0, t_n.length);    t_n[t_n.length - 1] = 2;    msgOmac.reset();    msgOmac.init(Collections.singletonMap(MAC_KEY_MATERIAL, key));    msgOmac.update(t_n, 0, t_n.length);    Integer modeSize = (Integer) attrib.get(MODE_BLOCK_SIZE);    if (modeSize == null)      {        modeSize = new Integer(cipherBlockSize);      }    HashMap ctrAttr = new HashMap();    ctrAttr.put(KEY_MATERIAL, key);    ctrAttr.put(IV, N);    ctrAttr.put(STATE, new Integer(ENCRYPTION));    ctrAttr.put(MODE_BLOCK_SIZE, modeSize);    ctr.reset();    ctr.init(ctrAttr);    Integer st = (Integer) attrib.get(STATE);    if (st != null)      {        state = st.intValue();        if (state != ENCRYPTION && state != DECRYPTION)          {            throw new IllegalArgumentException("invalid state");          }      }    else      {        state = ENCRYPTION;      }    Integer ts = (Integer) attrib.get(TRUNCATED_SIZE);    if (ts != null)      {        tagSize = ts.intValue();      }    else      {        tagSize = cipherBlockSize;      }    if (tagSize < 0 || tagSize > cipherBlockSize)      {        throw new IllegalArgumentException("tag size out of range");      }    init = true;  }  public int currentBlockSize()  {    return ctr.currentBlockSize();  }  public void encryptBlock(byte[] in, int inOff, byte[] out, int outOff)  {    if (!init)      {        throw new IllegalStateException("not initialized");      }    if (state != ENCRYPTION)      {        throw new IllegalStateException("not encrypting");      }    ctr.update(in, inOff, out, outOff);    msgOmac.update(out, outOff, ctr.currentBlockSize());  }  public void decryptBlock(byte[] in, int inOff, byte[] out, int outOff)  {    if (!init)      {        throw new IllegalStateException("not initialized");      }    if (state != DECRYPTION)      {        throw new IllegalStateException("not decrypting");      }    msgOmac.update(in, inOff, ctr.currentBlockSize());    ctr.update(in, inOff, out, outOff);  }  public void update(byte[] in, int inOff, byte[] out, int outOff)  {    switch (state)      {      case ENCRYPTION:        encryptBlock(in, inOff, out, outOff);        break;      case DECRYPTION:        decryptBlock(in, inOff, out, outOff);        break;      default:        throw new IllegalStateException("impossible state " + state);      }  }  public void reset()  {    nonceOmac.reset();    headerOmac.reset();    msgOmac.reset();    ctr.reset();  }  public boolean selfTest()  {    return true; // XXX  }  // IMac instance methods.  // ------------------------------------------------------------------------  public int macSize()  {    return tagSize;  }  public byte[] digest()  {    byte[] tag = new byte[tagSize];    digest(tag, 0);    return tag;  }  public void digest(byte[] out, int outOffset)  {    if (outOffset < 0 || outOffset + tagSize > out.length)      {        throw new IndexOutOfBoundsException();      }    byte[] N = nonceOmac.digest();    byte[] H = headerOmac.digest();    byte[] M = msgOmac.digest();    for (int i = 0; i < tagSize; i++)      {        out[outOffset + i] = (byte) (N[i] ^ H[i] ^ M[i]);      }    reset();  }  public void update(byte b)  {    if (!init)      {        throw new IllegalStateException("not initialized");      }    headerOmac.update(b);  }  public void update(byte[] buf, int off, int len)  {    if (!init)      {        throw new IllegalStateException("not initialized");      }    headerOmac.update(buf, off, len);  }}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线免费观看日本欧美| 日韩1区2区3区| 在线免费观看不卡av| 天天综合天天综合色| 久久久影视传媒| 色婷婷精品大在线视频| 午夜免费久久看| 国产午夜精品一区二区 | 亚洲人成网站在线| 欧美日韩不卡一区二区| 国产成人精品aa毛片| 一区二区三区蜜桃| 精品盗摄一区二区三区| 91在线你懂得| 精品一区二区国语对白| 亚洲综合激情另类小说区| 日韩三级免费观看| 色94色欧美sute亚洲线路一久| 夜夜爽夜夜爽精品视频| 久久看人人爽人人| 欧美色综合影院| 丁香桃色午夜亚洲一区二区三区| 丝袜诱惑亚洲看片| 亚洲柠檬福利资源导航| 久久久久88色偷偷免费| 欧美久久一二区| 懂色av噜噜一区二区三区av| 久久激情综合网| 亚洲综合激情网| 国产欧美一二三区| 精品国内片67194| 欧美精品一卡二卡| 成av人片一区二区| 国产福利电影一区二区三区| 日韩成人一区二区三区在线观看| **性色生活片久久毛片| 久久青草国产手机看片福利盒子 | 7777精品伊人久久久大香线蕉的 | 国产乱淫av一区二区三区| 另类小说欧美激情| 精品一区二区免费| 韩日av一区二区| 国内精品免费**视频| 国产自产2019最新不卡| 国产乱子伦视频一区二区三区| 国内精品嫩模私拍在线| 国产激情视频一区二区在线观看| 国产乱一区二区| 成人美女视频在线看| www.欧美色图| 91久久一区二区| 在线观看不卡一区| 7777精品伊人久久久大香线蕉超级流畅 | 国产一区二区女| 国产jizzjizz一区二区| www.欧美色图| 欧美三级在线看| 日韩三级视频在线看| 欧美精品一区二区三区蜜臀| 久久久久久久久一| 国产精品久久久久aaaa| 日韩一区中文字幕| 亚洲成a人v欧美综合天堂| 免费成人在线网站| 国产一本一道久久香蕉| a4yy欧美一区二区三区| 欧美日韩久久一区| 久久在线免费观看| 亚洲少妇中出一区| 日韩和的一区二区| 国产伦精一区二区三区| 成人免费黄色大片| 欧美色网一区二区| 精品国产免费人成在线观看| 亚洲天堂中文字幕| 无码av免费一区二区三区试看 | 理论电影国产精品| 成人免费看视频| 欧美日韩一区二区三区在线| 日韩一区二区三区在线视频| 国产日韩高清在线| 亚洲午夜精品网| 国产真实精品久久二三区| 国产精品久久久久久久久果冻传媒 | 肉肉av福利一精品导航| 国内久久精品视频| 91久久奴性调教| 精品美女在线观看| 最近日韩中文字幕| 麻豆视频观看网址久久| 91丨porny丨首页| 日韩精品一区国产麻豆| 亚洲激情网站免费观看| 国内精品第一页| 欧美日韩一区二区欧美激情| 久久九九国产精品| 香港成人在线视频| 不卡视频一二三四| 精品国产免费一区二区三区香蕉 | 欧美高清在线一区| 午夜精品久久久久| 99re8在线精品视频免费播放| 日韩一级免费观看| 亚洲一区免费观看| 99精品热视频| 亚洲综合自拍偷拍| 国产精品亚洲第一| 欧美日本一区二区三区四区| 国产精品久久久久久久浪潮网站| 日韩黄色免费网站| 日本精品一区二区三区高清| 国产亚洲自拍一区| 精品一区二区三区免费播放| 欧美日韩国产一级二级| 一区二区在线观看免费视频播放| 国产精品亚洲第一| 精品福利在线导航| 免费在线观看一区二区三区| 欧美日韩国产综合久久| 亚洲另类中文字| 91美女片黄在线观看91美女| 国产欧美一区二区精品忘忧草| 免费看日韩精品| 91精品国产高清一区二区三区蜜臀 | 亚洲精品综合在线| www.色精品| 亚洲欧洲精品天堂一级| 国产福利一区二区三区视频| 极品少妇xxxx精品少妇| 中文字幕国产一区二区| 麻豆精品新av中文字幕| 色综合中文字幕| 18涩涩午夜精品.www| 99久久99久久精品免费观看| 国产喂奶挤奶一区二区三区| 国产成人激情av| 久久久不卡影院| 国产成人福利片| 精品对白一区国产伦| 国产米奇在线777精品观看| 久久久国际精品| 国产成人av福利| 国产精品久久久久久久久久免费看| 成人久久久精品乱码一区二区三区| 欧美激情综合在线| 成人免费毛片app| 亚洲欧美另类小说| 欧美色网一区二区| 日本中文在线一区| 精品国产乱码久久久久久蜜臀| 国产美女视频91| 国产精品免费久久久久| 色婷婷亚洲一区二区三区| 亚洲一区二区三区中文字幕在线| 欧美日韩免费一区二区三区视频| 婷婷国产在线综合| 欧美成人bangbros| 福利一区二区在线观看| 国产精品高潮久久久久无| 中文字幕视频一区| 色又黄又爽网站www久久| 亚洲综合丝袜美腿| 3d动漫精品啪啪一区二区竹菊| 久久99国产精品麻豆| 国产蜜臀97一区二区三区| 91小视频免费看| 丝袜亚洲另类欧美| 久久久777精品电影网影网| 91亚洲资源网| 日韩中文字幕1| 国产目拍亚洲精品99久久精品| 一本到三区不卡视频| 免费成人av在线播放| 欧美国产丝袜视频| 欧美日韩国产综合草草| 黑人精品欧美一区二区蜜桃| 亚洲欧美一区二区三区极速播放| 欧美夫妻性生活| 国产成人免费视| 亚洲成人综合在线| 国产亚洲欧美日韩在线一区| 在线亚洲免费视频| 精品一区二区影视| 一区二区三区四区在线播放 | 夫妻av一区二区| 亚洲一级片在线观看| 久久人人97超碰com| 欧美色图在线观看| 国产91综合网| 日本欧美大码aⅴ在线播放| 国产精品色眯眯| 欧美一区二区三区小说| 99久久精品一区| 久久精品国产精品亚洲红杏| 亚洲女女做受ⅹxx高潮| 久久亚洲捆绑美女| 欧美日韩高清一区二区| 不卡av免费在线观看| 国内一区二区在线| 偷偷要91色婷婷|