Package anbxj

# Class Crypto_HmacPair

java.lang.Object
anbxj.Crypto_HmacPair

All Implemented Interfaces:
  `Serializable`

public class Crypto_HmacPair extends Object implements Serializable
A class to store the result of an HMAC operation along with metadata about the used algorithm. Moreover, it allows carrying information for AnBx private or public digests.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Crypto_HmacPair(Crypto_ByteArray hashValue, Crypto_SealedPair k, String HMacAlgorithm)`
  Constructs a Crypto_HmacPair with the specified parameters.
  `Crypto_HmacPair(Crypto_ByteArray hashValue, SecretKey sk, String HMacAlgorithm)`
  Constructs a Crypto_HmacPair with the specified parameters.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `anonymize()`
  Anonymizes the HMAC pair by removing the public secret key.
  `String`
  `getAlgorithm()`
  Gets the HMAC algorithm.
  `Crypto_ByteArray`
  `getHashValue()`
  Gets the hash value.
  `Crypto_SealedPair`
  `getK()`
  Gets the sealed pair.
  `SecretKey`
  `getSK()`
  Gets the secret key.
  `String`
  `toString()`
  Returns a string representation of the Crypto_HmacPair.

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

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

- ## Constructor Details

  - ### Crypto_HmacPair

    public Crypto_HmacPair(Crypto_ByteArray hashValue, Crypto_SealedPair k, String HMacAlgorithm)
    Constructs a Crypto_HmacPair with the specified parameters.
    Parameters:
      `hashValue` - The hash value.
      `k` - The sealed pair.
      `HMacAlgorithm` - The HMAC algorithm.

  - ### Crypto_HmacPair

    public Crypto_HmacPair(Crypto_ByteArray hashValue, SecretKey sk, String HMacAlgorithm)
    Constructs a Crypto_HmacPair with the specified parameters.
    Parameters:
      `hashValue` - The hash value.
      `sk` - The secret key.
      `HMacAlgorithm` - The HMAC algorithm.

- ## Method Details

  - ### getHashValue

    public Crypto_ByteArray getHashValue()
    Gets the hash value.
    Returns:
      The hash value.

  - ### getK

    public Crypto_SealedPair getK()
    Gets the sealed pair.
    Returns:
      The sealed pair.

  - ### getSK

    public SecretKey getSK()
    Gets the secret key.
    Returns:
      The secret key.

  - ### getAlgorithm

    public String getAlgorithm()
    Gets the HMAC algorithm.
    Returns:
      The HMAC algorithm.

  - ### anonymize

    public void anonymize()
    Anonymizes the HMAC pair by removing the public secret key.

  - ### toString

    public String toString()
    Returns a string representation of the Crypto_HmacPair.
    Overrides:
      `toString` in class `Object`