Class HMACSHA256Provider

  • All Implemented Interfaces:
    IHashProvider

    public class HMACSHA256Provider
    extends java.lang.Object
    implements IHashProvider
    Provides HMAC SHA-256 hashing.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] calc​(byte[] hashKey, byte[] buffer, int offset, int count)
      Calculate HMAC SHA256 hash for a byte buffer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HMACSHA256Provider

        public HMACSHA256Provider()
    • Method Detail

      • calc

        public byte[] calc​(byte[] hashKey,
                           byte[] buffer,
                           int offset,
                           int count)
        Calculate HMAC SHA256 hash for a byte buffer.
        Specified by:
        calc in interface IHashProvider
        Parameters:
        hashKey - The HMAC SHA256 key to use for hashing (32 bytes).
        buffer - The buffer to read the data from.
        offset - The position reading will start from.
        count - The count of bytes to be read.
        Returns:
        The HMAC SHA256 hash.
        Throws:
        IntegrityException - thrown if hash cannot be calculated