public class SM4BaseCipher extends CipherSpi
| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
BLOCKSIZE |
protected int |
inputLenUpdate |
protected int |
inputOffsetUpdate |
protected byte[] |
inputUpdate |
protected boolean |
isInitialized |
protected int |
len |
protected int |
opmode |
protected SM4Padding |
padding |
protected int[] |
rk |
protected SM4Util |
sm4 |
| 构造器和说明 |
|---|
SM4BaseCipher() |
| 限定符和类型 | 方法和说明 |
|---|---|
byte[] |
engineDoFinal(byte[] input,
int inputOffset,
int inputLen) |
int |
engineDoFinal(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset) |
protected int |
engineGetBlockSize() |
byte[] |
engineGetIV() |
int |
engineGetOutputSize(int inputLen) |
AlgorithmParameters |
engineGetParameters() |
void |
engineInit(int opmode,
Key key,
AlgorithmParameterSpec params,
SecureRandom random) |
void |
engineInit(int opmode,
Key key,
AlgorithmParameters params,
SecureRandom random) |
void |
engineInit(int opmode,
Key key,
SecureRandom random) |
protected void |
engineSetMode(String mode) |
void |
engineSetPadding(String padding) |
byte[] |
engineUpdate(byte[] input,
int inputOffset,
int inputLen) |
int |
engineUpdate(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset) |
protected void |
engineUpdateAAD(byte[] src,
int offset,
int len) |
protected void |
init(int opmode,
Key key) |
void |
reset()
reset some parameters after encryption
|
engineDoFinal, engineGetKeySize, engineUnwrap, engineUpdate, engineUpdateAAD, engineWrapprotected boolean isInitialized
protected final int BLOCKSIZE
protected int opmode
protected SM4Padding padding
protected SM4Util sm4
protected byte[] inputUpdate
protected int inputLenUpdate
protected int inputOffsetUpdate
protected int len
protected int[] rk
protected void engineUpdateAAD(byte[] src,
int offset,
int len)
engineUpdateAAD 在类中 CipherSpiprotected void engineSetMode(String mode) throws NoSuchAlgorithmException
engineSetMode 在类中 CipherSpiNoSuchAlgorithmExceptionpublic void engineSetPadding(String padding) throws NoSuchPaddingException
engineSetPadding 在类中 CipherSpiNoSuchPaddingExceptionprotected int engineGetBlockSize()
engineGetBlockSize 在类中 CipherSpipublic int engineGetOutputSize(int inputLen)
engineGetOutputSize 在类中 CipherSpipublic byte[] engineGetIV()
engineGetIV 在类中 CipherSpipublic AlgorithmParameters engineGetParameters()
engineGetParameters 在类中 CipherSpipublic void engineInit(int opmode,
Key key,
SecureRandom random)
throws InvalidKeyException
engineInit 在类中 CipherSpiInvalidKeyExceptionpublic void engineInit(int opmode,
Key key,
AlgorithmParameterSpec params,
SecureRandom random)
throws InvalidKeyException,
InvalidAlgorithmParameterException
public void engineInit(int opmode,
Key key,
AlgorithmParameters params,
SecureRandom random)
throws InvalidKeyException,
InvalidAlgorithmParameterException
protected void init(int opmode,
Key key)
throws InvalidKeyException
public byte[] engineUpdate(byte[] input,
int inputOffset,
int inputLen)
engineUpdate 在类中 CipherSpipublic int engineUpdate(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
throws ShortBufferException
engineUpdate 在类中 CipherSpiShortBufferExceptionpublic byte[] engineDoFinal(byte[] input,
int inputOffset,
int inputLen)
throws IllegalBlockSizeException,
BadPaddingException
public int engineDoFinal(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
throws ShortBufferException,
IllegalBlockSizeException,
BadPaddingException
public void reset()
Copyright © 2024. All rights reserved.