java.lang.Object
io.github.tonywasher.joceanus.gordianknot.api.mac.GordianMacSpec
All Implemented Interfaces:
GordianIdSpec, GordianKeySpec

public final class GordianMacSpec extends Object implements GordianKeySpec
Mac Specification.
  • Field Details

  • Constructor Details

    • GordianMacSpec

      public GordianMacSpec(GordianMacType pMacType, GordianLength pKeyLength, GordianDigestSpec pDigestSpec)
      hMac/skeinMac Constructor.
      Parameters:
      pMacType - the macType
      pKeyLength - the keyLength
      pDigestSpec - the digestSpec
    • GordianMacSpec

      public GordianMacSpec(GordianMacType pMacType, GordianSymKeySpec pKeySpec)
      gMac/Poly1305 Constructor.
      Parameters:
      pMacType - the macType
      pKeySpec - the keySpec
    • GordianMacSpec

      public GordianMacSpec(GordianMacType pMacType, GordianLength pKeyLength, GordianLength pLength)
      zucMac Constructor.
      Parameters:
      pMacType - the macType
      pKeyLength - the keyLength
      pLength - the length
    • GordianMacSpec

      public GordianMacSpec(GordianMacType pMacType, GordianSipHashSpec pSpec)
      sipHash Constructor.
      Parameters:
      pMacType - the macType
      pSpec - the SipHashSpec
    • GordianMacSpec

      public GordianMacSpec(GordianMacType pMacType, GordianLength pKeyLength)
      vmpcMac/raw poly1305Mac Constructor.
      Parameters:
      pMacType - the macType
      pKeyLength - the keyLength
  • Method Details

    • getMacType

      public GordianMacType getMacType()
      Obtain Mac Type.
      Returns:
      the MacType
    • getKeyLength

      public GordianLength getKeyLength()
      Description copied from interface: GordianKeySpec
      Obtain the keyLength.
      Specified by:
      getKeyLength in interface GordianKeySpec
      Returns:
      the keyLength
    • getSubSpec

      public Object getSubSpec()
      Obtain SubSpec.
      Returns:
      the SubSpec
    • isValid

      public boolean isValid()
      Is the macSpec valid?
      Returns:
      true/false.
    • getDigestSpec

      public GordianDigestSpec getDigestSpec()
      Obtain DigestSpec.
      Returns:
      the DigestSpec
    • getSymKeySpec

      public GordianSymKeySpec getSymKeySpec()
      Obtain SymKeySpec.
      Returns:
      the SymKeySpec
    • getSipHashSpec

      public GordianSipHashSpec getSipHashSpec()
      Obtain SipHashSpec.
      Returns:
      the Spec
    • getMacLength

      public GordianLength getMacLength()
      Obtain MacLength.
      Returns:
      the Length
    • getIVLen

      public int getIVLen()
      Obtain the IV length.
      Returns:
      the IV Length
    • isXof

      public boolean isXof()
      Is this a Xof Mac?
      Returns:
      true/false
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object pThat)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object