Package org.bouncycastle.crypto.macs

## Class Zuc128Mac

- java.lang.Object
- - org.bouncycastle.crypto.macs.Zuc128Mac

- All Implemented Interfaces:
    `Mac`

      public final class Zuc128Mac
      extends java.lang.Object
      implements Mac

  Zuc128 Mac implementation. Based on https://www.qtc.jp/3GPP/Specs/eea3eia3specificationv16.pdf

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Zuc128Mac()` | Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `doFinal​(byte[] out, int outOff)` | Finalize the mac.
    `java.lang.String` | `getAlgorithmName()` | Obtain Algorithm Name.
    `int` | `getMacSize()` | 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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Zuc128Mac

          public Zuc128Mac()

      Constructor.

  - ### Method Detail

    - #### getAlgorithmName

          public java.lang.String getAlgorithmName()

      Obtain Algorithm Name.
      Specified by:
        `getAlgorithmName` in interface `Mac`
      Returns:
        the name

    - #### getMacSize

          public int getMacSize()

      Obtain Mac Size.
      Specified by:
        `getMacSize` in interface `Mac`
      Returns:
        the size in Bytes

    - #### init

          public void init​(CipherParameters pParams)

      Initialise the Mac.
      Specified by:
        `init` in interface `Mac`
      Parameters:
        `pParams` - the parameters

    - #### update

          public void update​(byte in)

      Update the mac with a single byte.
      Specified by:
        `update` in interface `Mac`
      Parameters:
        `in` - the byte to update with

    - #### update

          public void update​(byte[] in,
                             int inOff,
                             int len)

      Update the mac.
      Specified by:
        `update` in interface `Mac`
      Parameters:
        `in` - the input buffer
        `inOff` - the starting offset in the input buffer
        `len` - the length of data to process

    - #### doFinal

          public int doFinal​(byte[] out,
                             int outOff)

      Finalize the mac.
      Specified by:
        `doFinal` in interface `Mac`
      Parameters:
        `out` - the output buffer
        `outOff` - the starting offset in the input buffer
      Returns:
        the size of the mac

    - #### reset

          public void reset()

      Description copied from interface: `Mac`
      Reset the MAC. At the end of resetting the MAC should be in the in the same state it was after the last init (if there was one).
      Specified by:
        `reset` in interface `Mac`