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

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

?? cfbblockcipher.java

?? 內容:基于jdk1.4的加密算法的具體實現
?? JAVA
字號:
package org.bouncycastle.crypto.modes;import org.bouncycastle.crypto.BlockCipher;import org.bouncycastle.crypto.CipherParameters;import org.bouncycastle.crypto.DataLengthException;import org.bouncycastle.crypto.params.ParametersWithIV;/** * implements a Cipher-FeedBack (CFB) mode on top of a simple cipher. */public class CFBBlockCipher    implements BlockCipher{    private byte[]          IV;    private byte[]          cfbV;    private byte[]          cfbOutV;    private int             blockSize;    private BlockCipher     cipher = null;    private boolean         encrypting;    /**     * Basic constructor.     *     * @param cipher the block cipher to be used as the basis of the     * feedback mode.     * @param bitBlockSize the block size in bits (note: a multiple of 8)     */    public CFBBlockCipher(        BlockCipher cipher,        int         bitBlockSize)    {        this.cipher = cipher;        this.blockSize = bitBlockSize / 8;        this.IV = new byte[cipher.getBlockSize()];        this.cfbV = new byte[cipher.getBlockSize()];        this.cfbOutV = new byte[cipher.getBlockSize()];    }    /**     * return the underlying block cipher that we are wrapping.     *     * @return the underlying block cipher that we are wrapping.     */    public BlockCipher getUnderlyingCipher()    {        return cipher;    }    /**     * Initialise the cipher and, possibly, the initialisation vector (IV).     * If an IV isn't passed as part of the parameter, the IV will be all zeros.     * An IV which is too short is handled in FIPS compliant fashion.     *     * @param encrypting if true the cipher is initialised for     *  encryption, if false for decryption.     * @param params the key and other data required by the cipher.     * @exception IllegalArgumentException if the params argument is     * inappropriate.     */    public void init(        boolean             encrypting,        CipherParameters    params)        throws IllegalArgumentException    {        this.encrypting = encrypting;                if (params instanceof ParametersWithIV)        {                ParametersWithIV ivParam = (ParametersWithIV)params;                byte[]      iv = ivParam.getIV();                if (iv.length < IV.length)                {                    // prepend the supplied IV with zeros (per FIPS PUB 81)                    System.arraycopy(iv, 0, IV, IV.length - iv.length, iv.length);                    for (int i = 0; i < IV.length - iv.length; i++)                    {                        IV[i] = 0;                    }                }                else                {                    System.arraycopy(iv, 0, IV, 0, IV.length);                }                reset();                cipher.init(true, ivParam.getParameters());        }        else        {                reset();                cipher.init(true, params);        }    }    /**     * return the algorithm name and mode.     *     * @return the name of the underlying algorithm followed by "/CFB"     * and the block size in bits.     */    public String getAlgorithmName()    {        return cipher.getAlgorithmName() + "/CFB" + (blockSize * 8);    }    /**     * return the block size we are operating at.     *     * @return the block size we are operating at (in bytes).     */    public int getBlockSize()    {        return blockSize;    }    /**     * Process one block of input from the array in and write it to     * the out array.     *     * @param in the array containing the input data.     * @param inOff offset into the in array the data starts at.     * @param out the array the output data will be copied into.     * @param outOff the offset into the out array the output will start at.     * @exception DataLengthException if there isn't enough data in in, or     * space in out.     * @exception IllegalStateException if the cipher isn't initialised.     * @return the number of bytes processed and produced.     */    public int processBlock(        byte[]      in,        int         inOff,        byte[]      out,        int         outOff)        throws DataLengthException, IllegalStateException    {        return (encrypting) ? encryptBlock(in, inOff, out, outOff) : decryptBlock(in, inOff, out, outOff);    }    /**     * Do the appropriate processing for CFB mode encryption.     *     * @param in the array containing the data to be encrypted.     * @param inOff offset into the in array the data starts at.     * @param out the array the encrypted data will be copied into.     * @param outOff the offset into the out array the output will start at.     * @exception DataLengthException if there isn't enough data in in, or     * space in out.     * @exception IllegalStateException if the cipher isn't initialised.     * @return the number of bytes processed and produced.     */    public int encryptBlock(        byte[]      in,        int         inOff,        byte[]      out,        int         outOff)        throws DataLengthException, IllegalStateException    {        if ((inOff + blockSize) > in.length)        {            throw new DataLengthException("input buffer too short");        }        if ((outOff + blockSize) > out.length)        {            throw new DataLengthException("output buffer too short");        }        cipher.processBlock(cfbV, 0, cfbOutV, 0);        //        // XOR the cfbV with the plaintext producing the cipher text        //        for (int i = 0; i < blockSize; i++)        {            out[outOff + i] = (byte)(cfbOutV[i] ^ in[inOff + i]);        }        //        // change over the input block.        //        System.arraycopy(cfbV, blockSize, cfbV, 0, cfbV.length - blockSize);        System.arraycopy(out, outOff, cfbV, cfbV.length - blockSize, blockSize);        return blockSize;    }    /**     * Do the appropriate processing for CFB mode decryption.     *     * @param in the array containing the data to be decrypted.     * @param inOff offset into the in array the data starts at.     * @param out the array the encrypted data will be copied into.     * @param outOff the offset into the out array the output will start at.     * @exception DataLengthException if there isn't enough data in in, or     * space in out.     * @exception IllegalStateException if the cipher isn't initialised.     * @return the number of bytes processed and produced.     */    public int decryptBlock(        byte[]      in,        int         inOff,        byte[]      out,        int         outOff)        throws DataLengthException, IllegalStateException    {        if ((inOff + blockSize) > in.length)        {            throw new DataLengthException("input buffer too short");        }        if ((outOff + blockSize) > out.length)        {            throw new DataLengthException("output buffer too short");        }        cipher.processBlock(cfbV, 0, cfbOutV, 0);        //        // change over the input block.        //        System.arraycopy(cfbV, blockSize, cfbV, 0, cfbV.length - blockSize);        System.arraycopy(in, inOff, cfbV, cfbV.length - blockSize, blockSize);        //        // XOR the cfbV with the plaintext producing the plain text        //        for (int i = 0; i < blockSize; i++)        {            out[outOff + i] = (byte)(cfbOutV[i] ^ in[inOff + i]);        }        return blockSize;    }    /**     * reset the chaining vector back to the IV and reset the underlying     * cipher.     */    public void reset()    {        System.arraycopy(IV, 0, cfbV, 0, IV.length);        cipher.reset();    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品888| 欧美一区二区视频在线观看2020| 在线亚洲免费视频| 欧美精品一区二区精品网| 亚洲人亚洲人成电影网站色| 久久国产尿小便嘘嘘尿| 欧美在线不卡视频| 最新国产精品久久精品| 国产一区不卡精品| 欧美一区二区三区成人| 亚洲成人av福利| 日本韩国欧美一区| 综合色天天鬼久久鬼色| 高清国产一区二区三区| 久久日一线二线三线suv| 日日摸夜夜添夜夜添亚洲女人| 91免费视频观看| 国产精品第一页第二页第三页 | 日韩午夜激情av| 综合av第一页| 99综合影院在线| 国产无遮挡一区二区三区毛片日本| 天堂成人免费av电影一区| 欧美网站一区二区| 亚洲第一成人在线| 一本久久a久久免费精品不卡| 国产精品久久久久永久免费观看| 黄色精品一二区| 精品福利二区三区| 精品无人区卡一卡二卡三乱码免费卡 | 日韩一区二区视频| 午夜免费久久看| 欧美午夜精品一区二区蜜桃| 一区二区在线电影| 欧美日韩免费高清一区色橹橹| 亚洲综合在线免费观看| 91视视频在线观看入口直接观看www| 久久久一区二区三区捆绑**| 国产精品99久久久久久似苏梦涵| 久久久欧美精品sm网站| 国产成人精品一区二| 国产精品日韩精品欧美在线| 色综合久久中文字幕| 亚洲一区二区三区国产| 777欧美精品| 国产一区二区三区久久久| 国产精品天美传媒| 日本黄色一区二区| 老司机精品视频线观看86| 久久综合色综合88| 成人自拍视频在线| 一区二区三区在线视频播放| 欧美日韩国产综合久久| 久久福利视频一区二区| 国产精品少妇自拍| 日本二三区不卡| 日本欧美加勒比视频| 国产欧美日韩不卡| 日韩精品一区二区三区在线播放| 青娱乐精品视频| 国产精品天美传媒沈樵| 欧美喷水一区二区| 国产黄色精品视频| 性做久久久久久免费观看| 精品国产1区二区| 色综合中文字幕国产 | 色中色一区二区| 日本伊人色综合网| 欧美激情一区二区三区不卡| 91成人网在线| 国产乱人伦偷精品视频免下载| 亚洲视频免费看| 精品嫩草影院久久| 在线亚洲一区二区| 国产成人精品三级麻豆| 五月天一区二区| 亚洲欧洲av一区二区三区久久| 欧美老人xxxx18| av电影天堂一区二区在线| 麻豆视频观看网址久久| 亚洲欧美日韩国产中文在线| 精品福利av导航| 欧美高清www午色夜在线视频| 丁香婷婷综合网| 精品一区二区日韩| 午夜精品福利在线| 亚洲免费视频成人| 国产片一区二区三区| 日韩免费视频线观看| 欧美午夜精品久久久久久超碰| 国产成人丝袜美腿| 紧缚奴在线一区二区三区| 日韩一区精品字幕| 亚洲成人av资源| 亚洲一级二级三级| 亚洲欧美另类图片小说| 国产精品亲子伦对白| 亚洲精品一区二区三区在线观看 | 色婷婷综合久久久| 成人国产精品免费观看| 国产综合成人久久大片91| 午夜电影一区二区三区| 一区二区三区四区在线| 国产精品短视频| 自拍偷拍欧美激情| 国产欧美在线观看一区| 久久女同性恋中文字幕| 精品99一区二区| 精品福利在线导航| 精品三级在线观看| 久久综合色天天久久综合图片| 欧美成人一级视频| 久久一区二区三区国产精品| 欧美电影免费提供在线观看| 欧美不卡一区二区三区| 欧美电影免费观看高清完整版在| 日韩欧美专区在线| 久久综合久久鬼色中文字| 久久久精品综合| 国产精品久久久一区麻豆最新章节| 国产日韩欧美综合一区| 欧美国产综合色视频| 国产午夜精品久久| 中文字幕欧美三区| 亚洲日本在线天堂| 亚洲成人激情社区| 美脚の诱脚舐め脚责91 | 中文字幕日韩精品一区| 自拍av一区二区三区| 一区二区三区.www| 秋霞影院一区二区| 99久久精品国产网站| 91免费国产视频网站| 欧美综合在线视频| 日韩视频一区二区三区在线播放 | 欧美亚洲一区二区三区四区| 欧美视频完全免费看| 91精品国产色综合久久ai换脸| 日韩免费高清电影| 国产日产欧美一区| 亚洲一区二区三区四区的| 麻豆精品久久久| 99在线精品观看| 3d成人h动漫网站入口| 久久久三级国产网站| 一区二区三区在线观看欧美| 久久综合综合久久综合| 91香蕉视频污| 91精品国产综合久久久蜜臀图片| 欧美精品一区二区三区视频| ●精品国产综合乱码久久久久| 视频一区在线播放| 波多野结衣中文字幕一区| 91精品免费观看| 日韩毛片精品高清免费| 美脚の诱脚舐め脚责91| 一本在线高清不卡dvd| 欧美成人综合网站| 有码一区二区三区| 国产一区二区网址| 欧美日本韩国一区二区三区视频| 亚洲国产精品二十页| 五月天一区二区三区| eeuss国产一区二区三区| 欧美一级黄色录像| 一区二区三区欧美亚洲| 懂色av一区二区三区蜜臀| 欧美日韩综合不卡| 一色屋精品亚洲香蕉网站| 看国产成人h片视频| 欧美色综合天天久久综合精品| 国产日韩三级在线| 激情欧美日韩一区二区| 欧美日韩不卡在线| 亚洲激情中文1区| 成人性色生活片免费看爆迷你毛片| 日韩一区二区三区电影在线观看 | 欧美丰满嫩嫩电影| 亚洲日穴在线视频| 国产+成+人+亚洲欧洲自线| 欧美一区二区精品久久911| 亚洲精品欧美综合四区| eeuss鲁片一区二区三区 | 日韩欧美在线1卡| 一二三区精品福利视频| 99精品国产一区二区三区不卡| 26uuu成人网一区二区三区| 日韩精品一级二级| 欧美伦理视频网站| 亚洲小少妇裸体bbw| 欧美午夜精品理论片a级按摩| 国产精品久久一级| 成人综合在线网站| 中文字幕av一区 二区| 岛国一区二区三区| 国产午夜精品一区二区三区嫩草 | 精品捆绑美女sm三区| 日韩—二三区免费观看av| 色综合av在线| 亚洲国产一区二区在线播放|