Class JCEMac
java.lang.Object
org.miaixz.bus.core.lang.wrapper.SimpleWrapper<Mac>
org.miaixz.bus.crypto.builtin.digest.mac.JCEMac
JDK提供的的MAC算法实现引擎,使用
Mac 实现摘要
当引入BouncyCastle库时自动使用其作为Provider- Since:
- Java 17+
- Author:
- Kimi Liu
-
Field Summary
Fields inherited from class org.miaixz.bus.core.lang.wrapper.SimpleWrapper
raw -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.miaixz.bus.core.lang.wrapper.SimpleWrapper
getRaw
-
Constructor Details
-
JCEMac
构造- Parameters:
algorithm- 算法key- 密钥
-
JCEMac
构造- Parameters:
algorithm- 算法key- 密钥
-
JCEMac
构造- Parameters:
algorithm- 算法key- 密钥spec-AlgorithmParameterSpec
-
-
Method Details
-
update
public void update(byte[] in) Description copied from interface:Mac加入需要被摘要的内容 -
update
public void update(byte[] in, int inOff, int len) Description copied from interface:Mac加入需要被摘要的内容 -
doFinal
public byte[] doFinal()Description copied from interface:Mac结束并生成摘要 -
reset
public void reset()Description copied from interface:Mac重置 -
getMacLength
public int getMacLength()Description copied from interface:Mac获取MAC算法块大小- Specified by:
getMacLengthin interfaceMac- Returns:
- MAC算法块大小
-
getAlgorithm
Description copied from interface:Mac获取当前算法- Specified by:
getAlgorithmin interfaceMac- Returns:
- 算法
-