ccmparameters.java

来自「J2ME加密算法的代码!里面包括常用的算法」· Java 代码 · 共 49 行

JAVA
49
字号
package org.bouncycastle.crypto.params;import org.bouncycastle.crypto.CipherParameters;public class CCMParameters    implements CipherParameters{    private byte[] associatedText;    private byte[] nonce;    private KeyParameter key;    private int macSize;    /**     * Base constructor.     *      * @param key key to be used by underlying cipher     * @param macSize macSize in bits     * @param nonce nonce to be used     * @param associatedText associated text, if any     */    public CCMParameters(KeyParameter key, int macSize, byte[] nonce, byte[] associatedText)    {        this.key = key;        this.nonce = nonce;        this.macSize = macSize;        this.associatedText = associatedText;    }        public KeyParameter getKey()    {        return key;    }        public int getMacSize()    {        return macSize;    }        public byte[] getAssociatedText()    {        return associatedText;    }        public byte[] getNonce()    {        return nonce;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?