public class ECB extends SM4BaseCipher
BLOCKSIZE, inputLenUpdate, inputOffsetUpdate, inputUpdate, isInitialized, len, opmode, padding, rk, sm4| 构造器和说明 |
|---|
ECB() |
| 限定符和类型 | 方法和说明 |
|---|---|
private void |
decrypt(byte[] input,
int inputOffset,
int inputLen,
byte[] res,
int offset)
SM4 bulk decryption
|
private byte[] |
decryptLastBlock(byte[] input,
int inputOffset,
int inputLen,
int extra)
decrypt the last block and return an array containing the decrypted result.
|
private int |
decryptLastBlock(byte[] input,
int inputOffset,
int inputLen,
int extra,
byte[] output,
int outputOffset)
decrypting the last block and return the number of bytes required to store the decryption result
|
private void |
encrypt(byte[] input,
int inputOffset,
int inputLen,
byte[] res,
int offset)
ECB encrypt
|
byte[] |
engineDoFinal(byte[] input,
int inputOffset,
int inputLen) |
int |
engineDoFinal(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset) |
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) |
byte[] |
engineUpdate(byte[] input,
int inputOffset,
int inputLen) |
int |
engineUpdate(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset) |
engineGetBlockSize, engineGetIV, engineGetOutputSize, engineGetParameters, engineSetMode, engineSetPadding, engineUpdateAAD, init, resetengineDoFinal, engineGetKeySize, engineUnwrap, engineUpdate, engineUpdateAAD, engineWrappublic void engineInit(int opmode,
Key key,
SecureRandom random)
throws InvalidKeyException
engineInit 在类中 SM4BaseCipherInvalidKeyExceptionpublic 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
public byte[] engineUpdate(byte[] input,
int inputOffset,
int inputLen)
engineUpdate 在类中 SM4BaseCipherpublic int engineUpdate(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
throws ShortBufferException
engineUpdate 在类中 SM4BaseCipherShortBufferExceptionpublic 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
private void decrypt(byte[] input,
int inputOffset,
int inputLen,
byte[] res,
int offset)
throws BadPaddingException
input - inputOffset - inputLen - res - offset - BadPaddingExceptionprivate byte[] decryptLastBlock(byte[] input,
int inputOffset,
int inputLen,
int extra)
throws BadPaddingException
input - inputOffset - inputLen - extra - the number of bytes required in addition to the input dataBadPaddingExceptionprivate int decryptLastBlock(byte[] input,
int inputOffset,
int inputLen,
int extra,
byte[] output,
int outputOffset)
throws BadPaddingException,
ShortBufferException
input - inputOffset - inputLen - extra - the number of bytes required in addition to the input dataoutput - outputOffset - BadPaddingExceptionShortBufferExceptionprivate void encrypt(byte[] input,
int inputOffset,
int inputLen,
byte[] res,
int offset)
input - inputOffset - inputLen - res - byte array to store the encryption resultoffset - Copyright © 2024. All rights reserved.