Package org.miaixz.bus.crypto.center
Class ZUC
java.lang.Object
org.miaixz.bus.crypto.builtin.symmetric.Crypto
org.miaixz.bus.crypto.center.ZUC
- All Implemented Interfaces:
Serializable,Decryptor,Encryptor
祖冲之算法集(ZUC算法)实现,基于BouncyCastle实现。
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]generateKey(org.miaixz.bus.core.lang.Algorithm algorithm) 生成ZUC算法密钥Methods inherited from class org.miaixz.bus.crypto.builtin.symmetric.Crypto
decrypt, decrypt, encrypt, encrypt, encrypt, getCipher, getSecretKey, init, setAlgorithmParameterSpec, setIv, setIv, setMode, setMode, setRandom, update, updateHexMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.miaixz.bus.crypto.builtin.symmetric.Decryptor
decrypt, decrypt, decryptString, decryptString, decryptString, decryptString, decryptString, decryptStringMethods inherited from interface org.miaixz.bus.crypto.builtin.symmetric.Encryptor
encrypt, encrypt, encrypt, encryptBase64, encryptBase64, encryptBase64, encryptBase64, encryptHex, encryptHex, encryptHex, encryptHex
-
Constructor Details
-
ZUC
public ZUC(org.miaixz.bus.core.lang.Algorithm algorithm, byte[] key, byte[] iv) 构造- Parameters:
algorithm- ZUC算法枚举,包括128位和256位两种key- 密钥iv- 加盐,128位加盐是16bytes,256位是25bytes,null是随机加盐
-
-
Method Details
-
generateKey
public static byte[] generateKey(org.miaixz.bus.core.lang.Algorithm algorithm) 生成ZUC算法密钥- Parameters:
algorithm- ZUC算法- Returns:
- 密钥
- See Also:
-