Свойство | Тип | Описание | |
---|---|---|---|
_keyBytes | int | ||
_salt | System.Int64 |
Метод | Описание | |
---|---|---|
Decrypt ( byte cryptedData, int offset, int length, byte key, int engineBoots, int engineTime, byte privacyParameters ) : byte[] |
Decrypt ScopedPdu BER encoded byte array.
|
|
Encrypt ( byte unencryptedData, int offset, int length, byte key, int engineBoots, int engineTime, byte &privacyParameters, IAuthenticationDigest authDigest ) : byte[] |
Encrypt ScopedPdu data BER encoded in a byte array.
|
|
ExtendShortKey ( byte shortKey, byte password, byte engineID, IAuthenticationDigest authProtocol ) : byte[] |
Some protocols support a method to extend the encryption or decryption key when supplied key is too short.
|
|
GetEncryptedLength ( int scopedPduLength ) : int |
Calculates and returns length of the buffer that is the result of the encryption method.
|
|
PasswordToKey ( byte secret, byte engineId, IAuthenticationDigest authProtocol ) : byte[] |
Convert privacy password into encryption key using packet authentication hash.
|
|
PrivacyAES ( int keyBytes ) : System |
Standard constructor.
|
Метод | Описание | |
---|---|---|
NextSalt ( ) : System.Int64 |
Get next salt Int64 value. Used internally to encrypt data.
|
public Decrypt ( byte cryptedData, int offset, int length, byte key, int engineBoots, int engineTime, byte privacyParameters ) : byte[] | ||
cryptedData | byte | Encrypted data byte array |
offset | int | Offset within the buffer to start decryption process from |
length | int | Length of data to decrypt |
key | byte | Decryption key |
engineBoots | int | Authoritative engine boots value. Retrieved as part of SNMP v3 discovery procedure |
engineTime | int | Authoritative engine time value. Retrieved as part of SNMP v3 discovery procedure |
privacyParameters | byte | Privacy parameters parsed from the incoming packet. |
Результат | byte[] |
public Encrypt ( byte unencryptedData, int offset, int length, byte key, int engineBoots, int engineTime, byte &privacyParameters, IAuthenticationDigest authDigest ) : byte[] | ||
unencryptedData | byte | BER encoded |
offset | int | Offset within the BER encoded byte array to start encryption operation from. |
length | int | Length of data to encrypt |
key | byte | Encryption key |
engineBoots | int | Authoritative engine boots value. Retrieved as part of SNMP v3 discovery process. |
engineTime | int | Authoritative engine time value. Retrieved as part of SNMP v3 discovery process. |
privacyParameters | byte | Byte array that will receive privacy parameters information that is the result of the /// encryption procedure. |
authDigest | IAuthenticationDigest | Authentication digest reference. Not used by AES protocol and can be null |
Результат | byte[] |
public ExtendShortKey ( byte shortKey, byte password, byte engineID, IAuthenticationDigest authProtocol ) : byte[] | ||
shortKey | byte | Key that needs to be extended |
password | byte | Privacy password as configured on the SNMP agent. |
engineID | byte | Authoritative engine id. Value is retrieved as part of SNMP v3 discovery procedure |
authProtocol | IAuthenticationDigest | Authentication protocol class instance cast as |
Результат | byte[] |
public GetEncryptedLength ( int scopedPduLength ) : int | ||
scopedPduLength | int | Length of the buffer that is needs to be encrypted. |
Результат | int |
public PasswordToKey ( byte secret, byte engineId, IAuthenticationDigest authProtocol ) : byte[] | ||
secret | byte | Privacy user secret |
engineId | byte | Authoritative engine id of the snmp agent |
authProtocol | IAuthenticationDigest | Authentication protocol |
Результат | byte[] |
public PrivacyAES ( int keyBytes ) : System | ||
keyBytes | int | Key size in bytes. Acceptable values are /// 16 = 128-bit key size, 24 = 192-bit key size, or 32 = 256-bit key size. |
Результат | System |