Interface SshHmac

All Superinterfaces:
Component, SecureComponent, SshComponent
All Known Implementing Classes:
AbstractHmac, HmacMD5, HmacMD596, HmacMD5ETM, HmacRipeMd160, HmacRipeMd160ETM, HmacSha1, HmacSha196, HmacSha1ETM, HmacSha256, HmacSha256_96, HmacSha256_at_ssh_dot_com, HmacSha256ETM, HmacSha512, HmacSha512_96, HmacSha512ETM, NoneHmac

public interface SshHmac extends SshComponent, SecureComponent
This interface should be implemented by all message authentication implementations.
Author:
Lee David Painter
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
     
    void
    generate(long sequenceNo, byte[] data, int offset, int len, byte[] output, int start)
     
     
    int
    The length of the message digest output by this implementation (maybe lower than mac size);
    int
    The size of the message digest output by the hmac algorithm
    void
    init(byte[] keydata)
     
    boolean
     
    void
    update(byte[] b)
     
    boolean
    verify(long sequenceNo, byte[] data, int start, int len, byte[] mac, int offset)
     

    Methods inherited from interface com.sshtools.common.ssh.SecureComponent

    getPriority, getSecurityLevel
  • Method Details

    • getMacSize

      int getMacSize()
      The size of the message digest output by the hmac algorithm
      Returns:
    • getMacLength

      int getMacLength()
      The length of the message digest output by this implementation (maybe lower than mac size);
      Returns:
    • generate

      void generate(long sequenceNo, byte[] data, int offset, int len, byte[] output, int start)
    • init

      void init(byte[] keydata) throws SshException
      Throws:
      SshException
    • verify

      boolean verify(long sequenceNo, byte[] data, int start, int len, byte[] mac, int offset)
    • update

      void update(byte[] b)
    • doFinal

      byte[] doFinal()
    • getAlgorithm

      String getAlgorithm()
      Specified by:
      getAlgorithm in interface SecureComponent
      Specified by:
      getAlgorithm in interface SshComponent
    • isETM

      boolean isETM()