Method | Description | |
---|---|---|
AuthenticationSHA1 ( ) : 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 SHA-1 authentication of a packet.
|
|
authenticateIncomingMsg ( byte userPassword, byte engineId, byte authenticationParameters, MutableByte wholeMessage ) : bool |
Verifies correct SHA-1 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 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 |
return | byte[] |
public PasswordToKey ( byte userPassword, byte engineID ) : byte[] | ||
userPassword | byte | User password |
engineID | byte | Authoritative engine id |
return | byte[] |
public authenticate ( byte authKey, byte wholeMessage ) : byte[] | ||
authKey | byte | Authentication key (not password) |
wholeMessage | byte | Message to authenticate |
return | byte[] |
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 |
return | byte[] |
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 |
return | bool |
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 |
return | bool |