Свойство | Тип | Описание | |
---|---|---|---|
_salt |
Метод | Описание | |
---|---|---|
Decrypt ( byte encryptedData, int offset, int length, byte key, int engineBoots, int engineTime, byte privacyParameters ) : byte[] |
Decrypt TripleDES encrypted ScopedPdu
|
|
Encrypt ( byte unencryptedData, int offset, int length, byte key, int engineBoots, int engineTime, byte &privacyParameters, IAuthenticationDigest authDigest ) : byte[] |
Encrypt ScopedPdu using TripleDES encryption protocol
|
|
ExtendShortKey ( byte shortKey, byte password, byte engineID, IAuthenticationDigest authProtocol ) : byte[] |
Extends the encryption key if key size returned by PasswordToKey is less then minimum required by the encryption protocol. There is no need to call this method in a user application becuase PasswordToKey() method will make the call if password it generates is too short. |
|
GetEncryptedLength ( int scopedPduLength ) : int |
Get final encrypted length TripleDES performs encryption on 8 byte blocks so the final encrypted size will be a mulitiple of 8 with padding added to the end of the ScopedPdu if required. |
|
NextSalt ( ) : int |
Returns next salt value.
|
|
PasswordToKey ( byte secret, byte engineId, IAuthenticationDigest authProtocol ) : byte[] |
Convert privacy password into encryption key using packet authentication hash.
|
|
Privacy3DES ( ) : System |
Standard constructor.
|
Метод | Описание | |
---|---|---|
GetIV ( byte privacyKey, byte salt ) : byte[] |
Generate IV from the privacy key and salt value returned by GetSalt method.
|
|
GetSalt ( int engineBoots ) : byte[] |
Get TripleDES 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. |
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. Used by TripleDES. |
Результат | 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/password |
engineId | byte | Authoritative engine id of the SNMP agent |
authProtocol | IAuthenticationDigest | Authentication protocol |
Результат | byte[] |