| Constructor and Description |
|---|
DefaultHMacEngine(String algorithm,
byte[] key)
构造
|
DefaultHMacEngine(String algorithm,
SecretKey key)
构造
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
digest(InputStream data,
int bufferLength)
生成摘要
|
Mac |
getMac()
获得
Mac |
DefaultHMacEngine |
init(String algorithm,
byte[] key)
初始化
|
DefaultHMacEngine |
init(String algorithm,
SecretKey key)
初始化
|
public DefaultHMacEngine(String algorithm, byte[] key)
algorithm - 算法key - 密钥public DefaultHMacEngine init(String algorithm, byte[] key)
algorithm - 算法key - 密钥public DefaultHMacEngine init(String algorithm, SecretKey key)
algorithm - 算法key - 密钥 SecretKeyorg.aoju.bus.core.lang.exception.InstrumentException - Cause by IOExceptionpublic byte[] digest(InputStream data, int bufferLength)
MacEnginedigest in interface MacEnginedata - InputStream 数据流bufferLength - 缓存长度,不足1使用 IoUtils.DEFAULT_BUFFER_SIZE 做为默认值Copyright © 2020. All rights reserved.