Decrypt TripleDES encrypted ScopedPdu

Namespace: SnmpSharpNet
Assembly: SnmpSharpNet (in SnmpSharpNet.dll) Version: 0.9.1.0 (0.9.1)

Syntax

C#
public byte[] Decrypt(
	byte[] encryptedData,
	int offset,
	int length,
	byte[] key,
	int engineBoots,
	int engineTime,
	byte[] privacyParameters
)
Visual Basic
Public Function Decrypt ( _
	encryptedData As Byte(), _
	offset As Integer, _
	length As Integer, _
	key As Byte(), _
	engineBoots As Integer, _
	engineTime As Integer, _
	privacyParameters As Byte() _
) As Byte()
Visual C++
public:
virtual array<unsigned char>^ Decrypt(
	array<unsigned char>^ encryptedData, 
	int offset, 
	int length, 
	array<unsigned char>^ key, 
	int engineBoots, 
	int engineTime, 
	array<unsigned char>^ privacyParameters
) sealed

Parameters

encryptedData
Type: array<System..::..Byte>[]()[][]
Source data buffer
offset
Type: System..::..Int32
Offset within the buffer to start decryption process
length
Type: System..::..Int32
Length of data to decrypt
key
Type: array<System..::..Byte>[]()[][]
Decryption key. Key length has to be 32 bytes in length or longer (bytes beyond 32 bytes are ignored).
engineBoots
Type: System..::..Int32
Authoritative engine boots value
engineTime
Type: System..::..Int32
Authoritative engine time value
privacyParameters
Type: array<System..::..Byte>[]()[][]
Privacy parameters extracted from USM header

Return Value

Decrypted byte array

Implements

IPrivacyProtocol..::..Decrypt(array<Byte>[]()[][], Int32, Int32, array<Byte>[]()[][], Int32, Int32, array<Byte>[]()[][])

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionThrown when encrypted data is null or length == 0
System..::..ArgumentOutOfRangeExceptionThrown when encryption key length is less then 32 byte or if privacy parameters argument is null or length other then 8 bytes

See Also