C# Class SnmpSharpNet.Authentication

Authentication helper class
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: AuthenticationDigests.None, AuthenticationDigests.MD5, or AuthenticationDigests.SHA1. Using Authentication.GetInstance, 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: IAuthenticationDigest authenticationImplementation = Authentication.GetInstance(AuthenticationDigests.MD5); authenticationImplementation.authenticateIncomingMsg(...); authenticationImplementation.authenticateOutgoingMsg(...);
显示文件 Open project: griffina/SnmpSharpNet

Public Methods

Method Description
GetInstance ( AuthenticationDigests authProtocol ) : IAuthenticationDigest

Get instance of authentication protocol.

Private Methods

Method Description
Authentication ( )

Constructor. Private to prevent the class from being instantiated.

Method Details

GetInstance() public static method

Get instance of authentication protocol.
public static GetInstance ( AuthenticationDigests authProtocol ) : IAuthenticationDigest
authProtocol AuthenticationDigests Authentication protocol code. Available codes are , /// or
return IAuthenticationDigest