Class HmacSHA256Provider

java.lang.Object
com.mku.integrity.HmacSHA256Provider
All Implemented Interfaces:
IHashProvider

public class HmacSHA256Provider extends Object implements IHashProvider
Provides HMAC SHA-256 hashing.
  • Constructor Details

    • HmacSHA256Provider

      public HmacSHA256Provider()
  • Method Details

    • 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