public class CBC extends StreamModeBaseCipher
counter, ivBLOCKSIZE, inputLenUpdate, inputOffsetUpdate, inputUpdate, isInitialized, len, opmode, padding, rk, sm4| 构造器和说明 |
|---|
CBC() |
| 限定符和类型 | 方法和说明 |
|---|---|
private void |
decryptCBC(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
decrypt entire blocks of data
|
private byte[] |
decryptLastBlock(byte[] input,
int inputOffset,
int inputLen,
int extra,
byte[] cipher)
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,
byte[] cipher)
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[] output,
int outputOffset)
encrypt with handling padding
|
private void |
encryptCBC(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
encrypt entire blocks of data
|
byte[] |
engineDoFinal(byte[] input,
int inputOffset,
int inputLen) |
int |
engineDoFinal(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset) |
byte[] |
engineUpdate(byte[] input,
int inputOffset,
int inputLen) |
int |
engineUpdate(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset) |
void |
reset()
reset some parameters after encryption
|
engineGetIV, engineGetParameters, engineInit, engineInit, engineInitengineGetBlockSize, engineGetOutputSize, engineSetMode, engineSetPadding, engineUpdateAAD, initengineDoFinal, engineGetKeySize, engineUnwrap, engineUpdate, engineUpdateAAD, engineWrappublic int engineUpdate(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
throws ShortBufferException
engineUpdate 在类中 SM4BaseCipherShortBufferExceptionpublic byte[] engineUpdate(byte[] input,
int inputOffset,
int inputLen)
engineUpdate 在类中 SM4BaseCipherpublic 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 byte[] decryptLastBlock(byte[] input,
int inputOffset,
int inputLen,
int extra,
byte[] cipher)
throws BadPaddingException
input - inputOffset - inputLen - extra - the number of bytes required in addition to the input datacipher - BadPaddingExceptionprivate int decryptLastBlock(byte[] input,
int inputOffset,
int inputLen,
int extra,
byte[] output,
int outputOffset,
byte[] cipher)
throws BadPaddingException,
ShortBufferException
input - inputOffset - inputLen - extra - output - outputOffset - cipher - BadPaddingExceptionShortBufferExceptionprivate void decryptCBC(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
input - inputOffset - inputLen - output - outputOffset - private void encrypt(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
input - inputOffset - inputLen - output - outputOffset - private void encryptCBC(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
input - inputOffset - inputLen - output - outputOffset - public void reset()
SM4BaseCipherreset 在类中 StreamModeBaseCipherCopyright © 2024. All rights reserved.