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

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

?? any_elgamal_pkcs1signature.java

?? jpeg2000編解碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
// $Id: Any_ElGamal_PKCS1Signature.java,v 1.1.1.1 2002/08/27 12:32:10 grosbois Exp $//// $Log: Any_ElGamal_PKCS1Signature.java,v $// Revision 1.1.1.1  2002/08/27 12:32:10  grosbois// Add cryptix 3.2//// Revision 1.4  2000/08/17 11:40:54  edwin// java.* -> xjava.*//// Revision 1.3  1997/12/14 17:37:58  hopwood// + Committed changes below.//// Revision 1.2.1  1997/12/10  hopwood// + initInternal was checking p before it was set.// + Cosmetics.//// Revision 1.2  1997/12/10 01:17:46  raif// + documentation.// + use cryptix.util.core.BI to process BigIntegers while//   signing and verifying signatures. Needed to eliminate size//   uncertainties when converting BigInteger to/from byte arrays.// + added tests for null objects in initInternal() and engineInitSign()//   methods.// + changed the AlgId semantics to align with RSA implementations.//// Revision 1.1  1997/12/07 06:37:27  hopwood// + Major overhaul of ElGamal to match RSA.//// Revision 1.1.1.1.1  1997/11/22  hopwood// + Renamed this class to Any_RSA_PKCS1Signature from//   RawElGamalSignature.//// Revision 1.1.1.1  1997/11/03 22:36:56  hopwood// + Imported to CVS (tagged as 'start').//// $Endlog$/* * Copyright (c) 1997 Systemics Ltd * on behalf of the Cryptix Development Team.  All rights reserved. */package cryptix.provider.elgamal;import cryptix.CryptixException;import cryptix.util.core.BI;import cryptix.util.core.Debug;import cryptix.util.core.Hex;import java.io.ByteArrayInputStream;import java.io.ByteArrayOutputStream;import java.io.IOException;import java.io.PrintWriter;import java.math.BigInteger;import java.util.Random;import java.security.Signature;import java.security.MessageDigest;import java.security.SecureRandom;import java.security.PublicKey;import java.security.PrivateKey;import java.security.SignatureException;import java.security.InvalidKeyException;import java.security.InvalidParameterException;import xjava.security.interfaces.ElGamalPublicKey;import xjava.security.interfaces.ElGamalPrivateKey;/** * An abstract class to digest a message and sign/verify the resulting * hash value, using any JCA MessageDigest algorithm with the ElGamal * digital signature scheme, and formatting and padding conventions * based on PKCS#1. * <p> * <b>References:</b> * <ol> *   <li> <a href="mailto:schneier@counterpane.com">Bruce Schneier</a>, *        "Section 19.6 ElGamal," *        <cite>Applied Cryptography, 2nd edition</cite>, *        John Wiley &amp; Sons, 1996. *        <p> *   <li> PKCS#1 *        An RSA Laboratories Technical Note<br> *        Version 1.5<br> *        Revised November 1, 1993<br> *        An "RSA Data Security, Inc. Public-Key Cryptography Standard (PKCS)" * </ol> * <p> * <b>$Revision: 1.1.1.1 $</b> * @author David Hopwood * @since  Cryptix 2.2.2 * * @see java.security.interfaces.ElGamalKey * @see ElGamalCipher * @see java.security.Signature */public abstract class Any_ElGamal_PKCS1Signatureextends Signature{// Debugging methods and vars.//............................................................................    private static final boolean DEBUG = Debug.GLOBAL_DEBUG;    private static final int debuglevel =        DEBUG ? Debug.getLevel("ElGamal", "Any_ElGamal_PKCS1Signature") : 0;    private static final PrintWriter err = DEBUG ? Debug.getOutput() : null;    private static void debug(String s) { err.println("Any_ElGamal_PKCS1Signature: " + s); }// Constants and variables//............................................................................    /**     * The minimum length of <i>p</i> in bits.     */    private static final int MIN_BITLENGTH = 256;    private static final int POSITIVE = 1;    private static final BigInteger ZERO = BigInteger.valueOf(0);    private static final BigInteger ONE = BigInteger.valueOf(1);    private BigInteger p;    private BigInteger g;    private BigInteger x; // null if the state is ENCRYPT    private BigInteger y;    private int primeLen;    private Random rng;    private MessageDigest md;// Constructor//............................................................................    /**     * Constructor for an Any_ElGamal_PKCS1Signature.     *     * @param  mdAlgorithm  the standard JCA algorithm name of the message     *                      digest to be used.     */    protected Any_ElGamal_PKCS1Signature (String mdAlgorithm) {        super(mdAlgorithm + "/ElGamal/PKCS#1");        try { md = MessageDigest.getInstance(mdAlgorithm); }        catch (Exception e) {            throw new CryptixException(getAlgorithm() +                ": Unable to instantiate the " + mdAlgorithm +                " MessageDigest\n" + e);        }    }// Signature abstract methods implementation//............................................................................    /**     * <b>SPI</b>: Initializes the cipher for signing, using the     * given private key. The key object must implement     * java.security.interfaces.ElGamalPrivateKey.     * <p>     * The input to this algorithm will be padded on the left with random     * bits, up to the size of a block, before signing.     *     * @param key   the private key     * @exception InvalidKeyException if !(key instanceof     *          java.security.interfaces.ElGamalPrivateKey)     */    protected void engineInitSign(PrivateKey key) throws InvalidKeyException {        if (!(key instanceof ElGamalPrivateKey))            throw new InvalidKeyException("ElGamal: signing key does not implement java.security.interfaces.ElGamalPrivateKey");        ElGamalPrivateKey privateKey = (ElGamalPrivateKey) key;        BigInteger newX = privateKey.getX();        if (newX == null) throw new InvalidKeyException("ElGamal: getX() == null");        initInternal(privateKey.getP(), privateKey.getG(),                     newX, privateKey.getY());        if (rng == null)            rng = new SecureRandom();    }    /**     * <b>SPI</b>: Initializes the cipher for verification, using the     * given public key. The key object must implement     * java.security.interfaces.ElGamalPublicKey.     *     * @param key   the public key     * @exception InvalidKeyException if !(key instanceof     *          java.security.interfaces.ElGamalPublicKey)     */    protected void engineInitVerify(PublicKey key) throws InvalidKeyException {        if (!(key instanceof ElGamalPublicKey))            throw new InvalidKeyException("ElGamal: verification key does not implement java.security.interfaces.ElGamalPublicKey");        ElGamalPublicKey publicKey = (ElGamalPublicKey) key;        initInternal(publicKey.getP(), publicKey.getG(),                     null, publicKey.getY());        if (rng == null)            rng = new SecureRandom();    }    private void initInternal(BigInteger newP, BigInteger newG,                              BigInteger newX, BigInteger newY)            throws InvalidKeyException{        if (newP == null) throw new InvalidKeyException("ElGamal: getP() == null");        if (newG == null) throw new InvalidKeyException("ElGamal: getG() == null");        if (newY == null) throw new InvalidKeyException("ElGamal: getY() == null");        if (newP.bitLength() < MIN_BITLENGTH)            throw new InvalidKeyException("ElGamal: getP().bitLength() < " + MIN_BITLENGTH);        if (newP.compareTo(ONE) <= 0)            throw new InvalidKeyException("ElGamal: getP() < 2");        p = newP;        g = newG;        x = newX;        y = newY;        primeLen = (p.bitLength() + 7) / 8;        md.reset();    }    /**     * Updates the data to be signed or verified, using one byte.     *     * @param  b  the byte to use for the update process.     * @exception SignatureException if the engine is not initialised properly.     */    protected void engineUpdate (byte b)    throws SignatureException {        if (state != VERIFY && state != SIGN)            throw new SignatureException(getAlgorithm() + ": Not initialized");        md.update(b);    }    /**     * Updates the data to be signed or verified, using the specified     * sub-array of bytes, starting at the specified offset.     *     * @param  in      the array of bytes.     * @param  offset  the offset to start from in <i>in</i>.     * @param  length  the number of bytes to use, starting at <i>offset</i>.     * @exception SignatureException if the engine is not initialised properly.     */    protected void engineUpdate (byte[] in, int offset, int length)    throws SignatureException {        if (state != VERIFY && state != SIGN)            throw new SignatureException(getAlgorithm() + ": Not initialized");        md.update(in, offset, length);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品素人视频| 偷拍自拍另类欧美| 日韩一区欧美二区| 国产不卡一区视频| 欧美精品视频www在线观看| 国产日韩亚洲欧美综合| 奇米色一区二区三区四区| av电影一区二区| 亚洲精品一区二区三区在线观看| 亚洲一区二区三区中文字幕| 成人黄色av网站在线| 日韩一级免费观看| 日韩精品亚洲一区| 色域天天综合网| 亚洲国产成人在线| 国产在线播精品第三| 欧美一区二区三区喷汁尤物| 夜夜揉揉日日人人青青一国产精品 | 欧美一区二区性放荡片| 中文字幕中文字幕一区二区| 国产精品综合二区| 日韩欧美不卡在线观看视频| 婷婷丁香激情综合| 欧美三级资源在线| 一区二区三区四区在线播放| 成人黄色av网站在线| 久久九九久久九九| 麻豆精品一二三| 日韩午夜在线观看视频| 日韩一区精品视频| 日韩一区二区视频在线观看| 丝袜美腿一区二区三区| 欧美裸体一区二区三区| 偷拍与自拍一区| 日韩一区二区三区视频在线观看| 日韩成人精品在线| 日韩欧美国产精品| 精品伊人久久久久7777人| 日韩欧美的一区| 激情综合色综合久久| 久久久蜜桃精品| 国产精品一区二区x88av| 2020日本不卡一区二区视频| 国产精品一区专区| 国产精品美女一区二区在线观看| av亚洲精华国产精华精| 亚洲精品乱码久久久久久久久| 色94色欧美sute亚洲线路二| 亚洲成av人在线观看| 日韩亚洲欧美在线| 国产一区二区三区在线观看免费 | 国产网红主播福利一区二区| 国产精品综合二区| 亚洲同性gay激情无套| 欧洲国内综合视频| 日韩制服丝袜先锋影音| 精品国产亚洲在线| 成人福利在线看| 亚洲国产欧美在线| 欧美v日韩v国产v| 成人av在线影院| 亚洲午夜av在线| 欧美精品一区二区三区蜜臀| 99免费精品视频| 三级欧美韩日大片在线看| www国产精品av| 色婷婷综合久色| 麻豆国产一区二区| 国产精品久久久久7777按摩| 欧美日韩国产综合视频在线观看| 国内精品久久久久影院色| ㊣最新国产の精品bt伙计久久| 欧美群妇大交群中文字幕| 国产一区视频网站| 亚洲一区二区三区四区五区黄| 欧美xxxx老人做受| 欧美体内she精视频| 国产高清成人在线| 丝袜诱惑亚洲看片| 中文字幕一区二区不卡 | 日韩高清电影一区| 国产精品久久久久久久岛一牛影视| 91热门视频在线观看| 蜜桃传媒麻豆第一区在线观看| 中文字幕 久热精品 视频在线| 欧美中文字幕亚洲一区二区va在线 | 久久综合999| 欧美三级韩国三级日本三斤| 国产成人一区在线| 青娱乐精品在线视频| 亚洲综合男人的天堂| 中文字幕不卡在线| 日韩免费电影一区| 欧美色视频在线观看| 99精品视频免费在线观看| 极品少妇xxxx精品少妇| 五月激情综合网| 亚洲一区二区在线免费观看视频| 久久久www成人免费毛片麻豆| 欧美绝品在线观看成人午夜影视| 99在线精品视频| 丁香网亚洲国际| 国产精品一区二区不卡| 精品一区精品二区高清| 日本不卡一二三| 婷婷中文字幕综合| 亚洲成人激情社区| 亚洲国产成人av| 一区二区三区四区激情| 亚洲欧美日韩在线| 成人免费在线视频观看| 中文字幕久久午夜不卡| 国产欧美精品日韩区二区麻豆天美| 日韩欧美一二三四区| 欧美一区二区三区男人的天堂| 欧美日韩国产123区| 欧美卡1卡2卡| 日韩精品一区二区三区swag | 久久久影院官网| 337p日本欧洲亚洲大胆精品| 久久综合久久综合九色| 精品国产污污免费网站入口 | 欧美性猛片aaaaaaa做受| 在线视频一区二区三| 欧美在线观看一区| 欧美精品一二三| 精品国内片67194| 久久久久久久久99精品| 国产清纯美女被跳蛋高潮一区二区久久w | 日韩亚洲电影在线| 欧美一级片在线| 日韩精品一区二区三区四区| 欧美成人a视频| 久久综合99re88久久爱| 国产精品美女久久福利网站| 中文字幕日韩精品一区| 亚洲国产精品一区二区www在线| 亚洲第一在线综合网站| 日本aⅴ免费视频一区二区三区| 久久精品国产免费看久久精品| 国产原创一区二区| 99九九99九九九视频精品| 在线免费观看一区| 日韩一区二区精品在线观看| 欧美高清在线一区| 夜夜爽夜夜爽精品视频| 美女网站视频久久| 成人黄色软件下载| 91.麻豆视频| 久久精品免费在线观看| 亚洲精品高清在线| 精品在线播放免费| 在线视频你懂得一区二区三区| 国产精品911| 欧美三级一区二区| 久久综合中文字幕| 久久激五月天综合精品| 不卡的av在线播放| 91精品国产91久久久久久一区二区 | 欧美一级精品大片| 国产精品久久久久久户外露出| 天天av天天翘天天综合网 | 91亚洲国产成人精品一区二区三| 欧美亚洲国产怡红院影院| 久久综合九色综合欧美亚洲| 亚洲精品亚洲人成人网| 国产一区二区91| 6080午夜不卡| 亚洲精品国产精华液| 国产精品亚洲一区二区三区妖精| 91蜜桃婷婷狠狠久久综合9色| 欧美成人aa大片| 亚洲成av人**亚洲成av**| 处破女av一区二区| 日韩欧美一二三区| 亚洲成人激情社区| 91久久精品一区二区三区| 国产亚洲成年网址在线观看| 天堂精品中文字幕在线| 99国产精品久久久久久久久久久| 久久中文娱乐网| 免费人成在线不卡| 欧美日本韩国一区| 亚洲影院免费观看| 色欲综合视频天天天| 国产精品久久久久久久午夜片| 激情文学综合网| 日韩欧美国产三级电影视频| 图片区小说区国产精品视频| 91国产成人在线| 亚洲欧洲日韩在线| 99久久婷婷国产精品综合| 久久精品一区蜜桃臀影院| 老鸭窝一区二区久久精品| 777奇米成人网| 麻豆91在线看| 日本丰满少妇一区二区三区| 亚洲欧美综合在线精品| 成熟亚洲日本毛茸茸凸凹| 国产午夜精品在线观看|