public class SM4 extends SymmetricCrypto
国密算法包括:
Modifier and Type | Field and Description |
---|---|
static String |
ALGORITHM_NAME |
Constructor and Description |
---|
SM4()
构造,使用随机密钥
|
SM4(byte[] key)
构造
|
SM4(Mode mode,
Padding padding)
构造,使用随机密钥
|
SM4(Mode mode,
Padding padding,
byte[] key)
构造
|
SM4(Mode mode,
Padding padding,
byte[] key,
byte[] iv)
构造
|
SM4(Mode mode,
Padding padding,
SecretKey key)
构造
|
SM4(Mode mode,
Padding padding,
SecretKey key,
byte[] iv)
构造
|
SM4(Mode mode,
Padding padding,
SecretKey key,
IvParameterSpec iv)
构造
|
SM4(String mode,
String padding)
构造
|
SM4(String mode,
String padding,
byte[] key)
构造
|
SM4(String mode,
String padding,
byte[] key,
byte[] iv)
构造
|
SM4(String mode,
String padding,
SecretKey key)
构造
|
SM4(String mode,
String padding,
SecretKey key,
IvParameterSpec iv)
构造
|
decrypt, decrypt, encrypt, encrypt, getCipher, getSecretKey, init, setIv, setIv, setMode, setParams, setRandom, update, updateHex
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
encrypt, encrypt, encrypt, encrypt, encryptBase64, encryptBase64, encryptBase64, encryptBase64, encryptBase64, encryptHex, encryptHex, encryptHex, encryptHex, encryptHex
decrypt, decrypt, decryptStr, decryptStr, decryptStr, decryptStr, decryptStr, decryptStr
public static final String ALGORITHM_NAME
public SM4()
public SM4(byte[] key)
key
- 密钥public SM4(Mode mode, Padding padding, SecretKey key, IvParameterSpec iv)
public SM4(String mode, String padding, byte[] key)
mode
- 模式padding
- 补码方式key
- 密钥,支持密钥长度:128位public SM4(String mode, String padding, byte[] key, byte[] iv)
mode
- 模式padding
- 补码方式key
- 密钥,支持密钥长度:128位iv
- 加盐public SM4(String mode, String padding, SecretKey key)
mode
- 模式padding
- 补码方式key
- 密钥,支持密钥长度:128位public SM4(String mode, String padding, SecretKey key, IvParameterSpec iv)
mode
- 模式padding
- 补码方式key
- 密钥,支持密钥长度:128位iv
- 加盐Copyright © 2024. All rights reserved.