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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdoFinal(byte[] out, int outOff) Finalize the mac.Obtain Algorithm Name.intObtain Mac Size.voidinit(CipherParameters pParams) Initialise the Mac.voidreset()Reset the Mac.voidupdate(byte in) Update the mac with a single byte.voidupdate(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:
getAlgorithmNamein interfaceMac- Returns:
- the name
-
getMacSize
public int getMacSize()Obtain Mac Size.- Specified by:
getMacSizein 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.
-