C# Класс 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(...);
Показать файл Открыть проект

Открытые методы

Метод Описание
GetInstance ( AuthenticationDigests authProtocol ) : IAuthenticationDigest

Get instance of authentication protocol.

Приватные методы

Метод Описание
Authentication ( )

Constructor. Private to prevent the class from being instantiated.

Описание методов

GetInstance() публичный статический Метод

Get instance of authentication protocol.
public static GetInstance ( AuthenticationDigests authProtocol ) : IAuthenticationDigest
authProtocol AuthenticationDigests Authentication protocol code. Available codes are , /// or
Результат IAuthenticationDigest