abstract class PBES2Core extends CipherSpi
| 限定符和类型 | 类和说明 |
|---|---|
static class |
PBES2Core.HmacSM3AndSM4_128_CBC_PKCS5Padding |
static class |
PBES2Core.HmacSM3AndSM4_128_ECB_PKCS5Padding |
| 限定符和类型 | 字段和说明 |
|---|---|
private static byte[] |
B0 |
private int |
blkSize |
private static String |
CBC_MODE |
private Cipher |
cipher |
private String |
cipherAlgo |
private static int |
DEFAULT_COUNT |
private static int |
DEFAULT_SALT_LENGTH |
private static String |
ECB_MODE |
private int |
iCount |
private IvParameterSpec |
ivSpec |
private SecretKeyFactory |
kdf |
private int |
keyLength |
private String |
mode |
private String |
padding |
private String |
pbeAlgo |
private byte[] |
salt |
private static Set<String> |
SUPPORTED_MODES |
| 构造器和说明 |
|---|
PBES2Core(String kdfAlgo,
String cipherAlgo,
int keySize,
String mode,
String padding)
Creates an instance of PBE Scheme 2 according to the selected
password-based key derivation function and encryption scheme.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected byte[] |
engineDoFinal(byte[] input,
int inputOffset,
int inputLen) |
protected int |
engineDoFinal(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset) |
protected int |
engineGetBlockSize() |
protected byte[] |
engineGetIV() |
protected int |
engineGetKeySize(Key key) |
protected int |
engineGetOutputSize(int inputLen) |
protected AlgorithmParameters |
engineGetParameters() |
protected void |
engineInit(int opmode,
Key key,
AlgorithmParameterSpec params,
SecureRandom random) |
protected void |
engineInit(int opmode,
Key key,
AlgorithmParameters params,
SecureRandom random) |
protected void |
engineInit(int opmode,
Key key,
SecureRandom random) |
protected void |
engineSetMode(String mode) |
protected void |
engineSetPadding(String paddingScheme) |
protected Key |
engineUnwrap(byte[] wrappedKey,
String wrappedKeyAlgorithm,
int wrappedKeyType) |
protected byte[] |
engineUpdate(byte[] input,
int inputOffset,
int inputLen) |
protected int |
engineUpdate(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset) |
protected byte[] |
engineWrap(Key key) |
engineDoFinal, engineUpdate, engineUpdateAAD, engineUpdateAADprivate static final byte[] B0
private static final int DEFAULT_SALT_LENGTH
private static final int DEFAULT_COUNT
private final Cipher cipher
private final int keyLength
private final int blkSize
private final SecretKeyFactory kdf
private final String pbeAlgo
private final String cipherAlgo
private int iCount
private byte[] salt
private IvParameterSpec ivSpec
private String mode
private String padding
PBES2Core(String kdfAlgo, String cipherAlgo, int keySize, String mode, String padding) throws NoSuchAlgorithmException, NoSuchPaddingException
protected void engineSetMode(String mode) throws NoSuchAlgorithmException
engineSetMode 在类中 CipherSpiNoSuchAlgorithmExceptionprotected void engineSetPadding(String paddingScheme) throws NoSuchPaddingException
engineSetPadding 在类中 CipherSpiNoSuchPaddingExceptionprotected int engineGetBlockSize()
engineGetBlockSize 在类中 CipherSpiprotected int engineGetOutputSize(int inputLen)
engineGetOutputSize 在类中 CipherSpiprotected byte[] engineGetIV()
engineGetIV 在类中 CipherSpiprotected AlgorithmParameters engineGetParameters()
engineGetParameters 在类中 CipherSpiprotected void engineInit(int opmode,
Key key,
SecureRandom random)
throws InvalidKeyException
engineInit 在类中 CipherSpiInvalidKeyExceptionprotected void engineInit(int opmode,
Key key,
AlgorithmParameterSpec params,
SecureRandom random)
throws InvalidKeyException,
InvalidAlgorithmParameterException
protected void engineInit(int opmode,
Key key,
AlgorithmParameters params,
SecureRandom random)
throws InvalidKeyException,
InvalidAlgorithmParameterException
protected byte[] engineUpdate(byte[] input,
int inputOffset,
int inputLen)
engineUpdate 在类中 CipherSpiprotected int engineUpdate(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
throws ShortBufferException
engineUpdate 在类中 CipherSpiShortBufferExceptionprotected byte[] engineDoFinal(byte[] input,
int inputOffset,
int inputLen)
throws IllegalBlockSizeException,
BadPaddingException
protected int engineDoFinal(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
throws ShortBufferException,
IllegalBlockSizeException,
BadPaddingException
protected int engineGetKeySize(Key key) throws InvalidKeyException
engineGetKeySize 在类中 CipherSpiInvalidKeyExceptionprotected byte[] engineWrap(Key key) throws IllegalBlockSizeException, InvalidKeyException
protected Key engineUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType) throws InvalidKeyException, NoSuchAlgorithmException
Copyright © 2022. All rights reserved.