Class HMACSM3

java.lang.Object
org.apache.sshd.common.mac.HMACSM3
All Implemented Interfaces:
AlgorithmNameProvider, Mac, MacInformation

public class HMACSM3 extends Object implements Mac
  • Field Details

    • hmacsm3

      private org.bouncycastle.crypto.macs.HMac hmacsm3
    • key

      private byte[] key
  • Constructor Details

    • HMACSM3

      public HMACSM3()
  • Method Details

    • init

      public void init(byte[] key) throws Exception
      Specified by:
      init in interface Mac
      Throws:
      Exception
    • update

      public void update(byte[] buf, int start, int len)
      Specified by:
      update in interface Mac
    • updateUInt

      public void updateUInt(long foo)
      Specified by:
      updateUInt in interface Mac
    • doFinal

      public void doFinal(byte[] buf, int offset) throws Exception
      Specified by:
      doFinal in interface Mac
      Throws:
      Exception
    • getBlockSize

      public int getBlockSize()
      Specified by:
      getBlockSize in interface MacInformation
      Returns:
      MAC output block size in bytes - may be less than the default - e.g., MD5-96
    • getDefaultBlockSize

      public int getDefaultBlockSize()
      Specified by:
      getDefaultBlockSize in interface MacInformation
      Returns:
      The "natural" MAC block size in bytes
    • getAlgorithm

      public String getAlgorithm()
      Specified by:
      getAlgorithm in interface AlgorithmNameProvider