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

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

?? cipher.java

?? gcc的組建
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* Cipher.java -- Interface to a cryptographic cipher.   Copyright (C) 2004  Free Software Foundation, Inc.This file is 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, or (at your 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; see the file COPYING.  If not, write to theFree Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA02110-1301 USA.Linking 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 javax.crypto;import gnu.java.security.Engine;import java.security.AlgorithmParameters;import java.security.InvalidAlgorithmParameterException;import java.security.InvalidKeyException;import java.security.Key;import java.security.NoSuchAlgorithmException;import java.security.NoSuchProviderException;import java.security.Provider;import java.security.SecureRandom;import java.security.Security;import java.security.cert.Certificate;import java.security.cert.X509Certificate;import java.security.spec.AlgorithmParameterSpec;import java.util.StringTokenizer;/** * <p>This class implements a cryptographic cipher for transforming * data.</p> * * <p>Ciphers cannot be instantiated directly; rather one of the * <code>getInstance</code> must be used to instantiate a given * <i>transformation</i>, optionally with a specific provider.</p> * * <p>A transformation is of the form:</p> * * <ul> * <li><i>algorithm</i>/<i>mode</i>/<i>padding</i>, or</li> * <li><i>algorithm</i> * </ul> * * <p>where <i>algorithm</i> is the base name of a cryptographic cipher * (such as "AES"), <i>mode</i> is the abbreviated name of a block * cipher mode (such as "CBC" for cipher block chaining mode), and * <i>padding</i> is the name of a padding scheme (such as * "PKCS5Padding"). If only the algorithm name is supplied, then the * provider-specific default mode and padding will be used.</p> * * <p>An example transformation is:</p> * * <blockquote><code>Cipher c = * Cipher.getInstance("AES/CBC/PKCS5Padding");</code></blockquote> * * <p>Finally, when requesting a block cipher in stream cipher mode * (such as <acronym title="Advanced Encryption Standard">AES</acronym> * in OFB or CFB mode) the number of bits to be processed * at a time may be specified by appending it to the name of the mode; * e.g. <code>"AES/OFB8/NoPadding"</code>. If no such number is * specified a provider-specific default value is used.</p> * * @author Casey Marshall (csm@gnu.org) * @see java.security.KeyGenerator * @see javax.crypto.SecretKey */public class Cipher{  // Constants and variables.  // ------------------------------------------------------------------------  private static final String SERVICE = "Cipher";  /**   * The decryption operation mode.   */  public static final int DECRYPT_MODE = 2;  /**   * The encryption operation mode.   */  public static final int ENCRYPT_MODE = 1;  /**   * Constant for when the key to be unwrapped is a private key.   */  public static final int PRIVATE_KEY = 2;  /**   * Constant for when the key to be unwrapped is a public key.   */  public static final int PUBLIC_KEY = 1;  /**   * Constant for when the key to be unwrapped is a secret key.   */  public static final int SECRET_KEY = 3;  /**   * The key unwrapping operation mode.   */  public static final int UNWRAP_MODE = 4;  /**   * The key wrapping operation mode.   */  public static final int WRAP_MODE = 3;  /**   * The uninitialized state. This state signals that any of the   * <code>init</code> methods have not been called, and therefore no   * transformations can be done.   */  private static final int INITIAL_STATE = 0;  /** The underlying cipher service provider interface. */  private CipherSpi cipherSpi;  /** The provider from which this instance came. */  private Provider provider;  /** The transformation requested. */  private String transformation;  /** Our current state (encrypting, wrapping, etc.) */  private int state;  // Class methods.  // ------------------------------------------------------------------------  /**   * <p>Creates a new cipher instance for the given transformation.</p>   *   * <p>The installed providers are tried in order for an   * implementation, and the first appropriate instance is returned. If   * no installed provider can provide the implementation, an   * appropriate exception is thrown.</p>   *   * @param transformation The transformation to create.   * @return An appropriate cipher for this transformation.   * @throws java.security.NoSuchAlgorithmException If no installed   *         provider can supply the appropriate cipher or mode.   * @throws javax.crypto.NoSuchPaddingException If no installed   *         provider can supply the appropriate padding.   */  public static final Cipher getInstance(String transformation)    throws NoSuchAlgorithmException, NoSuchPaddingException  {    Provider[] providers = Security.getProviders();    NoSuchPaddingException ex = null;    String msg = "";    for (int i = 0; i < providers.length; i++)      {        try          {            return getInstance(transformation, providers[i]);          }        catch (NoSuchAlgorithmException nsae)          {            msg = nsae.getMessage();            ex = null;          }        catch (NoSuchPaddingException nspe)          {            ex = nspe;          }      }    if (ex != null)      {        throw ex;      }    throw new NoSuchAlgorithmException(msg);  }  /**   * <p>Creates a new cipher instance for the given transformation and   * the named provider.</p>   *   * @param transformation The transformation to create.   * @param provider       The name of the provider to use.   * @return An appropriate cipher for this transformation.   * @throws java.security.NoSuchAlgorithmException If the provider cannot   *         supply the appropriate cipher or mode.   * @throws java.security.NoSuchProviderException If the named provider   *         is not installed.   * @throws javax.crypto.NoSuchPaddingException If the provider cannot   *         supply the appropriate padding.   */  public static final Cipher getInstance(String transformation, String provider)    throws NoSuchAlgorithmException, NoSuchProviderException,           NoSuchPaddingException  {    Provider p = Security.getProvider(provider);    if (p == null)      {        throw new NoSuchProviderException(provider);      }    return getInstance(transformation, p);  }  /**   * Creates a new cipher instance for the given transform and the given   * provider.   *   * @param transformation The transformation to create.   * @param provider       The provider to use.   * @return An appropriate cipher for this transformation.   * @throws java.security.NoSuchAlgorithmException If the given   *         provider cannot supply the appropriate cipher or mode.   * @throws javax.crypto.NoSuchPaddingException If the given   *         provider cannot supply the appropriate padding scheme.   */  public static final Cipher getInstance(String transformation, Provider provider)    throws NoSuchAlgorithmException, NoSuchPaddingException  {    CipherSpi result = null;    String key = null;    String alg = null, mode = null, pad = null;    String msg = "";    if (transformation.indexOf('/') < 0)      {        try          {            result = (CipherSpi) Engine.getInstance(SERVICE, transformation,                                                    provider);            return new Cipher(result, provider, transformation);          }        catch (Exception e)          {            msg = e.getMessage();          }      }    else      {        StringTokenizer tok = new StringTokenizer(transformation, "/");        if (tok.countTokens() != 3)          {            throw new NoSuchAlgorithmException("badly formed transformation");          }        alg = tok.nextToken();        mode = tok.nextToken();        pad = tok.nextToken();        try          {            result = (CipherSpi) Engine.getInstance(SERVICE, transformation,                                                    provider);            return new Cipher(result, provider, transformation);          }        catch (Exception e)          {            msg = e.getMessage();          }        try          {            result = (CipherSpi) Engine.getInstance(SERVICE, alg + '/' + mode,                                                    provider);            result.engineSetPadding(pad);            return new Cipher(result, provider, transformation);          }        catch (Exception e)          {            if (e instanceof NoSuchPaddingException)              {                throw (NoSuchPaddingException) e;              }            msg = e.getMessage();          }        try          {            result = (CipherSpi) Engine.getInstance(SERVICE, alg + "//" + pad,                                                    provider);            result.engineSetMode(mode);            return new Cipher(result, provider, transformation);          }        catch (Exception e)          {            msg = e.getMessage();          }        try          {            result = (CipherSpi) Engine.getInstance(SERVICE, alg, provider);            result.engineSetMode(mode);            result.engineSetPadding(pad);            return new Cipher(result, provider, transformation);          }        catch (Exception e)          {            if (e instanceof NoSuchPaddingException)              {                throw (NoSuchPaddingException) e;              }            msg = e.getMessage();          }      }    throw new NoSuchAlgorithmException(transformation + ": " + msg);  }// Constructor.  // ------------------------------------------------------------------------  /**   * Create a cipher.   *   * @param cipherSpi The underlying implementation of the cipher.   * @param provider  The provider of this cipher implementation.   * @param transformation The transformation this cipher performs.   */  protected  Cipher(CipherSpi cipherSpi, Provider provider, String transformation)  {    this.cipherSpi = cipherSpi;    this.provider = provider;    this.transformation = transformation;    state = INITIAL_STATE;  }// Public instance methods.  // ------------------------------------------------------------------------  /**   * Get the name that this cipher instance was created with; this is   * equivalent to the "transformation" argument given to any of the   * {@link #getInstance()} methods.   *   * @return The cipher name.   */  public final String getAlgorithm()  {    return transformation;  }  /**   * Return the size of blocks, in bytes, that this cipher processes.   *   * @return The block size.   */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品自拍在线| 日本大香伊一区二区三区| 成人国产精品免费网站| 色哟哟一区二区三区| 欧美一区二区人人喊爽| 亚洲人成网站精品片在线观看 | 国产精品久久看| 日韩高清一区在线| 97久久人人超碰| 26uuuu精品一区二区| 亚洲午夜一二三区视频| 成人av网站免费观看| 欧美电影免费观看高清完整版| 亚洲三级理论片| 国产a精品视频| 日韩欧美专区在线| 亚洲va韩国va欧美va| 91亚洲资源网| 国产精品久久福利| 国产精品996| 久久久不卡影院| 麻豆精品蜜桃视频网站| 欧美精品1区2区3区| 亚洲愉拍自拍另类高清精品| 91啪在线观看| 亚洲精品免费在线| 色综合天天做天天爱| 五月激情丁香一区二区三区| bt7086福利一区国产| 欧美高清在线一区二区| 国产成人在线色| 国产视频一区在线播放| 国产成人无遮挡在线视频| 国产亚洲视频系列| 国产成人免费av在线| 日本一区二区三区在线不卡| 国产精品一区2区| 久久精子c满五个校花| 国产乱色国产精品免费视频| 国产欧美精品一区二区三区四区 | 久久99久久久久| 日韩视频不卡中文| 国产sm精品调教视频网站| 欧美mv日韩mv亚洲| 国产资源精品在线观看| 久久精品一区二区三区不卡| 国产69精品久久久久777| 国产欧美日韩不卡免费| 99综合电影在线视频| 亚洲视频免费观看| 欧美中文字幕不卡| 美女视频黄免费的久久 | 亚洲成人激情社区| 91精品婷婷国产综合久久性色| 日本欧美一区二区三区乱码| 精品理论电影在线观看| 国产成a人亚洲| 亚洲黄网站在线观看| 欧美蜜桃一区二区三区| 极品美女销魂一区二区三区免费| 久久一区二区三区国产精品| 成人黄色av网站在线| 亚洲一区二区三区在线看| 日韩免费一区二区| 成人午夜伦理影院| 亚洲chinese男男1069| 久久色在线视频| 91猫先生在线| 麻豆精品视频在线| 亚洲男人天堂av网| 精品国产免费人成在线观看| 91在线小视频| 看片网站欧美日韩| 国产精品丝袜在线| 制服视频三区第一页精品| 高清beeg欧美| 日本视频一区二区三区| 欧美激情在线一区二区| 欧美日韩一级黄| 岛国一区二区三区| 青青草成人在线观看| 亚洲欧洲国产日韩| 精品国产免费视频| 91国在线观看| 岛国av在线一区| 六月婷婷色综合| 一卡二卡欧美日韩| 日本一区二区三区久久久久久久久不| 欧美丝袜第三区| 99在线视频精品| 激情综合色丁香一区二区| 亚洲一区二区三区视频在线| 久久久国产一区二区三区四区小说 | 欧美精品乱码久久久久久| 国产91精品入口| 麻豆精品国产传媒mv男同| 一区二区三区欧美激情| 国产精品久久久久久久蜜臀| 日韩欧美成人激情| 欧美精品高清视频| 色婷婷狠狠综合| 成人免费av在线| 国产精品一二三区| 韩国视频一区二区| 老司机午夜精品| 蜜臀久久99精品久久久久宅男| 一区二区三区四区亚洲| 亚洲免费观看高清| 国产精品久久久久久久久图文区 | 免费av成人在线| eeuss鲁片一区二区三区| 亚洲天堂福利av| 欧美成人女星排名| 欧美亚日韩国产aⅴ精品中极品| 丁香六月久久综合狠狠色| 国产一区亚洲一区| 久久成人免费网站| 日韩电影在线观看电影| 午夜电影一区二区| 午夜精品福利一区二区三区av| 亚洲永久免费av| 亚洲线精品一区二区三区| 一区二区三区小说| 亚洲国产精品久久人人爱| 亚洲一区二区三区四区在线观看| 亚洲午夜在线电影| 日韩综合小视频| 久久国产麻豆精品| 久久成人免费电影| 国产精品一色哟哟哟| 国产成人h网站| 99精品国产视频| 欧洲精品一区二区三区在线观看| 99精品视频一区二区三区| 91免费版在线| 欧美日韩国产综合一区二区| 欧美男人的天堂一二区| 日韩欧美中文字幕一区| 久久久久久97三级| 国产精品电影一区二区三区| 一区二区三区免费在线观看| 婷婷成人激情在线网| 狠狠色综合播放一区二区| 国产91丝袜在线播放九色| 91理论电影在线观看| 91精品久久久久久久久99蜜臂| 亚洲精品一区二区三区影院 | 久久久久久久网| 国产精品成人免费在线| 亚洲成人动漫av| 国内不卡的二区三区中文字幕| 国产精品一区久久久久| 色婷婷综合在线| 欧美一区二区三区爱爱| 国产欧美精品一区aⅴ影院| 亚洲激情六月丁香| 精品一区二区免费视频| 欧美在线不卡视频| 久久色视频免费观看| 一区二区三区在线观看欧美| 激情伊人五月天久久综合| 在线看日本不卡| 国产午夜亚洲精品午夜鲁丝片| 亚洲一区二区三区美女| 成人中文字幕电影| 91精品国产品国语在线不卡| 国产精品网站一区| 免费在线观看不卡| 在线精品国精品国产尤物884a| 精品少妇一区二区三区视频免付费 | 亚洲午夜电影网| 国产91精品精华液一区二区三区| 欧美视频精品在线| 中文字幕av一区二区三区高| 日韩电影免费一区| 色综合视频在线观看| 国产亚洲午夜高清国产拍精品| 丝袜诱惑制服诱惑色一区在线观看 | 久久国产日韩欧美精品| 91久久精品一区二区三区| 久久久久久免费| 美女一区二区视频| 欧美日韩精品是欧美日韩精品| 国产精品免费久久| 国产伦精一区二区三区| 日韩一二三区不卡| 亚洲成人av福利| 日本韩国精品在线| 自拍偷拍欧美精品| 成人一区二区三区中文字幕| 精品国产乱码久久久久久图片 | 中文字幕乱码日本亚洲一区二区| 日本亚洲天堂网| 欧美吻胸吃奶大尺度电影 | www亚洲一区| 老司机午夜精品| 日韩午夜激情视频| 欧美aⅴ一区二区三区视频| 9191精品国产综合久久久久久| 亚洲网友自拍偷拍|