Authentication helper class

Namespace: SnmpSharpNet
Assembly: SnmpSharpNet (in SnmpSharpNet.dll) Version: 0.9.1.0 (0.9.1)

Syntax

C#
public sealed class Authentication
Visual Basic
Public NotInheritable Class Authentication
Visual C++
public ref class Authentication sealed

Remarks

Helper class to make dealing with multiple (if 2 qualifies as multiple) authentication protocols in a transparent way. Calling class keeps the authentication protocol selection (as defined on the agent) in an integer variable that can have 3 values: None, MD5, or SHA1. Using GetInstance(AuthenticationDigests), calling method can get authentication protocol implementation class instance cast as IAuthenticationDigest interface and perform authentication operations (either authenticate outgoing packets to verify authentication of incoming packets) without needing to further care about which authentication protocol is used. Example of how to use this class:
CopyC#
IAuthenticationDigest authenticationImplementation = Authentication.GetInstance(AuthenticationDigests.MD5);
authenticationImplementation.authenticateIncomingMsg(...);
authenticationImplementation.authenticateOutgoingMsg(...);

Inheritance Hierarchy

System..::..Object
  SnmpSharpNet..::..Authentication

See Also