Convert privacy password into encryption key using packet authentication hash.
Namespace: SnmpSharpNetAssembly: SnmpSharpNet (in SnmpSharpNet.dll) Version: 0.9.1.0 (0.9.1)
Syntax
| C# |
|---|
byte[] PasswordToKey( byte[] secret, byte[] engineId, IAuthenticationDigest authProtocol ) |
| Visual Basic |
|---|
Function PasswordToKey ( _ secret As Byte(), _ engineId As Byte(), _ authProtocol As IAuthenticationDigest _ ) As Byte() |
| Visual C++ |
|---|
array<unsigned char>^ PasswordToKey( array<unsigned char>^ secret, array<unsigned char>^ engineId, IAuthenticationDigest^ authProtocol ) |
Parameters
- secret
- Type: array<System..::..Byte>[]()[][]
Privacy user secret
- engineId
- Type: array<System..::..Byte>[]()[][]
Authoritative engine id of the snmp agent
- authProtocol
- Type: SnmpSharpNet..::..IAuthenticationDigest
Authentication protocol
Return Value
Encryption key
Exceptions
| Exception | Condition |
|---|---|
| SnmpSharpNet..::..SnmpPrivacyException | Thrown when key size is shorter then MinimumKeyLength |