| Constructor and Description |
|---|
BCHMacEngine(org.bouncycastle.crypto.Digest digest,
byte[] key)
构造
|
BCHMacEngine(org.bouncycastle.crypto.Digest digest,
org.bouncycastle.crypto.CipherParameters params)
构造
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
digest(InputStream data,
int bufferLength)
生成摘要
|
String |
getAlgorithm()
获取当前算法
|
org.bouncycastle.crypto.Mac |
getMac()
获得
Mac |
int |
getMacLength()
获取MAC算法块大小
|
BCHMacEngine |
init(org.bouncycastle.crypto.Digest digest,
org.bouncycastle.crypto.CipherParameters params)
初始化
|
public BCHMacEngine(org.bouncycastle.crypto.Digest digest,
byte[] key)
digest - 摘要算法,为Digest 的接口实现key - 密钥public BCHMacEngine(org.bouncycastle.crypto.Digest digest,
org.bouncycastle.crypto.CipherParameters params)
digest - 摘要算法params - 参数,例如密钥可以用KeyParameterpublic BCHMacEngine init(org.bouncycastle.crypto.Digest digest, org.bouncycastle.crypto.CipherParameters params)
digest - 摘要算法params - 参数,例如密钥可以用KeyParameterpublic byte[] digest(InputStream data, int bufferLength)
MacEnginedigest in interface MacEnginedata - InputStream 数据流bufferLength - 缓存长度,不足1使用 IoUtils.DEFAULT_BUFFER_SIZE 做为默认值public org.bouncycastle.crypto.Mac getMac()
MacMacpublic int getMacLength()
MacEnginegetMacLength in interface MacEnginepublic String getAlgorithm()
MacEnginegetAlgorithm in interface MacEngineCopyright © 2020. All rights reserved.