C# Class SnmpSharpNet.AuthenticationMD5

MD5 Authentication class.
Inheritance: IAuthenticationDigest
Afficher le fichier Open project: griffina/SnmpSharpNet

Méthodes publiques

Méthode Description
AuthenticationMD5 ( ) : System

Standard constructor

ComputeHash ( byte data, int offset, int count ) : byte[]

Compute hash using authentication protocol.

PasswordToKey ( byte userPassword, byte engineID ) : byte[]

Convert user password to acceptable authentication key.

authenticate ( byte authKey, byte wholeMessage ) : byte[]

Authenticate packet and return authentication parameters value to the caller

authenticate ( byte authenticationSecret, byte engineId, byte wholeMessage ) : byte[]

Authenticate packet and return authentication parameters value to the caller

authenticateIncomingMsg ( byte authKey, byte authenticationParameters, MutableByte wholeMessage ) : bool

Verify MD5 authentication of a packet.

authenticateIncomingMsg ( byte userPassword, byte engineId, byte authenticationParameters, MutableByte wholeMessage ) : bool

Verifies correct MD5 authentication of the frame. Prior to calling this method, you have to extract authentication parameters from the wholeMessage and reset authenticationParameters field in the USM information block to 12 0x00 values.

Method Details

AuthenticationMD5() public méthode

Standard constructor
public AuthenticationMD5 ( ) : System
Résultat System

ComputeHash() public méthode

Compute hash using authentication protocol.
public ComputeHash ( byte data, int offset, int count ) : byte[]
data byte Data to hash
offset int Compute hash from the source buffer offset
count int Compute hash for source data length
Résultat byte[]

PasswordToKey() public méthode

Convert user password to acceptable authentication key.
Thrown when key length is less then 8 bytes
public PasswordToKey ( byte userPassword, byte engineID ) : byte[]
userPassword byte Authentication password
engineID byte Authoritative engine id
Résultat byte[]

authenticate() public méthode

Authenticate packet and return authentication parameters value to the caller
public authenticate ( byte authKey, byte wholeMessage ) : byte[]
authKey byte Pre-generated authentication key
wholeMessage byte Message being authenticated
Résultat byte[]

authenticate() public méthode

Authenticate packet and return authentication parameters value to the caller
public authenticate ( byte authenticationSecret, byte engineId, byte wholeMessage ) : byte[]
authenticationSecret byte User authentication secret
engineId byte SNMP agent authoritative engine id
wholeMessage byte Message to authenticate
Résultat byte[]

authenticateIncomingMsg() public méthode

Verify MD5 authentication of a packet.
public authenticateIncomingMsg ( byte authKey, byte authenticationParameters, MutableByte wholeMessage ) : bool
authKey byte Authentication key (not password)
authenticationParameters byte Authentication parameters extracted from the packet being authenticated
wholeMessage MutableByte Entire packet being authenticated
Résultat bool

authenticateIncomingMsg() public méthode

Verifies correct MD5 authentication of the frame. Prior to calling this method, you have to extract authentication parameters from the wholeMessage and reset authenticationParameters field in the USM information block to 12 0x00 values.
public authenticateIncomingMsg ( byte userPassword, byte engineId, byte authenticationParameters, MutableByte wholeMessage ) : bool
userPassword byte User password
engineId byte Authoritative engine id
authenticationParameters byte Extracted USM authentication parameters
wholeMessage MutableByte Whole message with authentication parameters zeroed (0x00) out
Résultat bool