Package org.bouncycastle.crypto.macs
Class Zuc256Mac
java.lang.Object
org.bouncycastle.crypto.macs.Zuc256Mac
- All Implemented Interfaces:
Mac
Zuc256 Mac implementation.
Based on https://www.is.cas.cn/ztzl2016/zouchongzhi/201801/W020180126529970733243.pdf
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
doFinal
(byte[] out, int outOff) Finalize the mac.Obtain Algorithm Name.int
Obtain Mac Size.void
init
(CipherParameters pParams) Initialise the Mac.void
reset()
Reset the Mac.void
update
(byte in) Update the mac with a single byte.void
update
(byte[] in, int inOff, int len) Update the mac.
-
Constructor Details
-
Zuc256Mac
public Zuc256Mac(int pLength) Constructor.- Parameters:
pLength
- the bit length of the Mac
-
-
Method Details
-
getAlgorithmName
Obtain Algorithm Name.- Specified by:
getAlgorithmName
in interfaceMac
- Returns:
- the name
-
getMacSize
public int getMacSize()Obtain Mac Size.- Specified by:
getMacSize
in interfaceMac
- Returns:
- the size in Bytes
-
init
Initialise the Mac. -
update
public void update(byte in) Update the mac with a single byte. -
update
public void update(byte[] in, int inOff, int len) Update the mac. -
doFinal
public int doFinal(byte[] out, int outOff) Finalize the mac. -
reset
public void reset()Reset the Mac.
-