SNMP Version 3 DES privacy protocol implementation. DES requires an encryption key be provided of 16 bytes in length. Class will accept longer key values (which will be trimmed to 16 bytes) but both encrypt and decrypt operations will fail if key is shorter then required value length. Decryption operation depends on USM header privacyParameters field value which is generated by the Encrypt method. Make sure privacyParameters argument value is correctly inserted into the target packet to enable SNMP agent to decrypt the message.

Namespace:  SnmpSharpNet
Assembly:  SnmpSharpNet (in SnmpSharpNet.dll) Version: 0.5.0.0 (0.5.0.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public class PrivacyDES : IPrivacyProtocol
Public Class PrivacyDES _
	Implements IPrivacyProtocol
public ref class PrivacyDES : IPrivacyProtocol

Members

            
 All Members  Constructors   Properties   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
PrivacyDES()()()
Standard constructor.
CanExtendShortKey
DES implementation does NOT support extending of a short encryption key. Always returns false.
Decrypt(array<Byte>[]()[], Int32, Int32, array<Byte>[]()[], Int32, Int32, array<Byte>[]()[])
Decrypt DES encrypted ScopedPdu
Encrypt(array<Byte>[]()[], Int32, Int32, array<Byte>[]()[], Int32, Int32, array<Byte>[]()[]%)
Encrypt ScopedPdu using DES encryption protocol
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
ExtendShortKey(array<Byte>[]()[], array<Byte>[]()[], array<Byte>[]()[], IAuthenticationDigest)
Operation not used by DES. Key length has to be 16 bytes of encryption/decryption operation will fail. When called, shortKey is returned.
GetEncryptedLength(Int32)
Get final encrypted length
GetHashCode()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()
Gets the Type of the current instance.
(Inherited from Object.)
MaximumKeyLength
Return maximum encryption/decryption key length. For DES, returned value is 16 DES protocol itself requires an 8 byte key. Additional 8 bytes are used for generating the encryption IV. For encryption itself, first 8 bytes of the key are used.
MinimumKeyLength
Returns minimum encryption/decryption key length. For DES, returned value is 16. DES protocol itself requires an 8 byte key. Additional 8 bytes are used for generating the encryption IV. For encryption itself, first 8 bytes of the key are used.
Name
Privacy protocol name
PasswordToKey(array<Byte>[]()[], array<Byte>[]()[], IAuthenticationDigest)
Convert privacy password into encryption key using packet authentication hash.
PrivacyParametersLength
Returns the length of privacyParameters USM header field. For DES, field length is 8.
ToString()()()
Returns a String that represents the current Object.
(Inherited from Object.)

Inheritance Hierarchy

System..::.Object
  SnmpSharpNet..::.PrivacyDES

See Also