Свойство | Тип | Описание | |
---|---|---|---|
_salt |
Метод | Описание | |
---|---|---|
Decrypt ( byte encryptedData, int offset, int length, byte key, int engineBoots, int engineTime, byte privacyParameters ) : byte[] |
Decrypt DES encrypted ScopedPdu
|
|
Encrypt ( byte unencryptedData, int offset, int length, byte key, int engineBoots, int engineTime, byte &privacyParameters, IAuthenticationDigest authDigest ) : byte[] |
Encrypt ScopedPdu using DES encryption protocol
|
|
ExtendShortKey ( byte shortKey, byte password, byte engineID, IAuthenticationDigest authProtocol ) : byte[] |
Operation not used by DES. Key length has to be 16 bytes of encryption/decryption operation will fail. When called, shortKey is returned.
|
|
GetEncryptedLength ( int scopedPduLength ) : int |
Get final encrypted length
|
|
PasswordToKey ( byte secret, byte engineId, IAuthenticationDigest authProtocol ) : byte[] |
Convert privacy password into encryption key using packet authentication hash.
|
|
PrivacyDES ( ) : System |
Standard constructor.
|
Метод | Описание | |
---|---|---|
NextSalt ( ) : int |
Returns next salt value.
|
Метод | Описание | |
---|---|---|
GetIV ( byte privacyKey, byte salt ) : byte[] |
Generate IV from the privacy key and salt value returned by GetSalt method.
|
|
GetKey ( byte privacyPassword ) : byte[] |
Extract and return DES encryption key. Privacy password is 16 bytes in length. Only the first 8 bytes are used as DES password. Remaining 8 bytes are used as pre-IV value.
|
|
GetSalt ( int engineBoots ) : byte[] |
Get DES encryption salt value. Salt value is generated by concatenating engineBoots value with the random integer value.
|
public Decrypt ( byte encryptedData, int offset, int length, byte key, int engineBoots, int engineTime, byte privacyParameters ) : byte[] | ||
encryptedData | byte | Source data buffer |
offset | int | Offset within the buffer to start decryption process |
length | int | Length of data to decrypt |
key | byte | Decryption key. Key length has to be 32 bytes in length or longer (bytes beyond 32 bytes are ignored). |
engineBoots | int | Authoritative engine boots value |
engineTime | int | Authoritative engine time value |
privacyParameters | byte | Privacy parameters extracted from USM header |
Результат | byte[] |
public Encrypt ( byte unencryptedData, int offset, int length, byte key, int engineBoots, int engineTime, byte &privacyParameters, IAuthenticationDigest authDigest ) : byte[] | ||
unencryptedData | byte | Unencrypted ScopedPdu byte array |
offset | int | Offset to start encryption |
length | int | Length of data to encrypt |
key | byte | Encryption key. Key has to be at least 32 bytes is length |
engineBoots | int | Authoritative engine boots value |
engineTime | int | Authoritative engine time value. Not used for DES |
privacyParameters | byte | Privacy parameters out buffer. This field will be filled in with information /// required to decrypt the information. Output length of this field is 8 bytes and space has to be reserved /// in the USM header to store this information |
authDigest | IAuthenticationDigest | Authentication digest class reference. Not used by DES and can be null. |
Результат | byte[] |
public ExtendShortKey ( byte shortKey, byte password, byte engineID, IAuthenticationDigest authProtocol ) : byte[] | ||
shortKey | byte | Encryption key |
password | byte | Privacy password |
engineID | byte | Authoritative engine id |
authProtocol | IAuthenticationDigest | Authentication protocol class instance |
Результат | byte[] |
public GetEncryptedLength ( int scopedPduLength ) : int | ||
scopedPduLength | int | BER encoded ScopedPdu data length |
Результат | 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[] |