Module org.snmp4j

Class AuthSHA2

All Implemented Interfaces:
Serializable, AuthenticationProtocol, SecurityProtocol
Direct Known Subclasses:
AuthHMAC128SHA224, AuthHMAC192SHA256, AuthHMAC256SHA384, AuthHMAC384SHA512

public class AuthSHA2 extends AuthGeneric
The SHA-2 class implements the Secure Hash Authentication 2.
Version:
2.4.0
Author:
Frank Fock
See Also:
  • Constructor Details

    • AuthSHA2

      @Deprecated public AuthSHA2(String protocolName, OID protocolOID, int digestLength, int authenticationCodeLength)
      Deprecated.
      Use AuthSHA2(String, OID, int, int, int) instead to specify the correct HMAC block size
      Creates a SHA authentication protocol with the specified digest length.
      Parameters:
      protocolName - the SHA protocol name (i.e., "SHA-256").
      protocolOID - the OID of the protocol as defined in RFC 7630.
      digestLength - the digest length.
      authenticationCodeLength - the length of the authentication hash output in octets.
    • AuthSHA2

      public AuthSHA2(String protocolName, OID protocolOID, int digestLength, int authenticationCodeLength, int hmacBlockSize)
      Creates a SHA authentication protocol with the specified digest length.
      Parameters:
      protocolName - the SHA protocol name (i.e., "SHA-256").
      protocolOID - the OID of the protocol as defined in RFC 7630.
      digestLength - the digest length.
      authenticationCodeLength - the length of the authentication hash output in octets.
      hmacBlockSize - the HMAC block size of the authentication protocol.
  • Method Details

    • getID

      public OID getID()
      Description copied from interface: AuthenticationProtocol
      Gets the OID uniquely identifying the authentication protocol.
      Returns:
      an OID instance.