Back to FlowSsh Documentation

MacAlgs Structure/Class

[C]

struct FlowSshC_MacAlgs
{
  byte m_hmacSha2_256;
  byte m_hmacSha1;
  byte m_hmacMd5;
  byte m_hmacSha2_256_96;
  byte m_hmacSha1_96;
  byte m_hmacMd5_96;
  byte m_none;
};

[C++]

struct MacAlgs : public FlowSshC_MacAlgs
{
  MacAlgs()
  {
    m_hmacSha2_256 = m_hmacSha1 = m_hmacMd5 = 1;
    m_hmacSha2_256_96 = m_hmacSha1_96 = m_hmacMd5_96 = 1;
    m_none = 0;
  }
};

[C#]

public sealed class MacAlgs
{
  public byte HmacSha2_256;
  public byte HmacSha1;
  public byte HmacMd5;
  public byte HmacSha2_256_96;
  public byte HmacSha1_96;
  public byte HmacMd5_96;
  public byte None;
  
  public MacAlgs()
  {
    HmacSha2_256 = HmacSha1 = HmacMd5 = 1;
    HmacSha2_256_96 = HmacSha1_96 = HmacMd5_96 = 1;
    None = 0;
  }
}

Members

  • HmacSha2_256: Priority of "hmac-sha2-256".
  • HmacSha1: Priority of "hmac-sha1".
  • HmacMd5: Priority of "hmac-md5".
  • HmacSha2_256_96: Priority of "hmac-sha2-256-96".
  • HmacSha1_96: Priority of "hmac-sha1-96".
  • HmacMd5_96: Priority of "hmac-md5-96".
  • None: Priority of "none" (no message authentication used).

Remarks

The MacAlgs structure/class is used to enable and prioritize or disable various message authentication (integrity check) algorithms for the session. The algorithm names should be self-explanatory. For member values the following rules apply:

  • An algorithm is enabled if it holds a non-zero value.
  • Algorithms with lower non-zero values precede algorithms with higher values.
  • Algorithms holding the same non-zero value are ordered by their declaration order.
  • You should NOT enable the "none" algorithm, except strictly for testing purposes. All other algorithms can normally be enabled.

By default, all MAC algorithms are enabled except "none". They are ordered by their declaration order.