Class Hmac

java.lang.Object

public class Hmac
extends NativeStruct
Wrapper for the native WolfCrypt Hmac implementation.
Version:
2.0, March 2017
Author:
Moisés Guimarães
  • Field Details

    • MD5

      public static final int MD5
    • SHA

      public static final int SHA
    • SHA256

      public static final int SHA256
    • SHA384

      public static final int SHA384
    • SHA512

      public static final int SHA512
  • Constructor Details

    • Hmac

      public Hmac()
    • Hmac

      public Hmac​(int type, byte[] key)
  • Method Details

    • mallocNativeStruct

      protected long mallocNativeStruct() throws java.lang.OutOfMemoryError
      Specified by:
      mallocNativeStruct in class NativeStruct
      Throws:
      java.lang.OutOfMemoryError
    • setKey

      public void setKey​(int type, byte[] key)
    • reset

      public void reset()
    • update

      public void update​(byte data)
    • update

      public void update​(byte[] data)
    • update

      public void update​(byte[] data, int offset, int length)
    • update

      public void update​(java.nio.ByteBuffer data)
    • doFinal

      public byte[] doFinal()
    • doFinal

      public byte[] doFinal​(byte[] data)
    • getAlgorithm

      public java.lang.String getAlgorithm()
    • getMacLength

      public int getMacLength()