public class ZUC extends SymmetricCrypto
Modifier and Type | Class and Description |
---|---|
static class |
ZUC.ZUCAlgorithm
ZUC类型,包括128位和256位
|
Constructor and Description |
---|
ZUC(ZUC.ZUCAlgorithm algorithm,
byte[] key,
byte[] iv)
构造
|
Modifier and Type | Method and Description |
---|---|
static byte[] |
generateKey(ZUC.ZUCAlgorithm algorithm)
生成ZUC算法密钥
|
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 ZUC(ZUC.ZUCAlgorithm algorithm, byte[] key, byte[] iv)
algorithm
- ZUC算法枚举,包括128位和256位两种key
- 密钥iv
- 加盐,128位加盐是16bytes,256位是25bytes,null
是随机加盐public static byte[] generateKey(ZUC.ZUCAlgorithm algorithm)
algorithm
- ZUC算法KeyUtil.generateKey(String)
Copyright © 2024. All rights reserved.