public class BCMacEngine extends Object implements MacEngine
Mac
实现摘要Constructor and Description |
---|
BCMacEngine(org.bouncycastle.crypto.Mac mac,
org.bouncycastle.crypto.CipherParameters params)
构造
|
Modifier and Type | Method and Description |
---|---|
byte[] |
doFinal()
结束并生成摘要
|
String |
getAlgorithm()
获取当前算法
|
org.bouncycastle.crypto.Mac |
getMac()
获得
Mac |
int |
getMacLength()
获取MAC算法块大小
|
BCMacEngine |
init(org.bouncycastle.crypto.Mac mac,
org.bouncycastle.crypto.CipherParameters params)
初始化
|
void |
reset()
重置
|
void |
update(byte[] in,
int inOff,
int len)
加入需要被摘要的内容
|
public BCMacEngine(org.bouncycastle.crypto.Mac mac, org.bouncycastle.crypto.CipherParameters params)
mac
- Mac
params
- 参数,例如密钥可以用KeyParameter
public BCMacEngine init(org.bouncycastle.crypto.Mac mac, org.bouncycastle.crypto.CipherParameters params)
mac
- 摘要算法params
- 参数,例如密钥可以用KeyParameter
public void update(byte[] in, int inOff, int len)
MacEngine
public byte[] doFinal()
MacEngine
public void reset()
MacEngine
public int getMacLength()
MacEngine
getMacLength
in interface MacEngine
public String getAlgorithm()
MacEngine
getAlgorithm
in interface MacEngine
Copyright © 2024. All rights reserved.