Encrypt ScopedPdu data BER encoded in a byte array.

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

Syntax

C#
public byte[] Encrypt(
	byte[] unencryptedData,
	int offset,
	int length,
	byte[] key,
	int engineBoots,
	int engineTime,
	out byte[] privacyParameters,
	IAuthenticationDigest authDigest
)
Visual Basic
Public Function Encrypt ( _
	unencryptedData As Byte(), _
	offset As Integer, _
	length As Integer, _
	key As Byte(), _
	engineBoots As Integer, _
	engineTime As Integer, _
	<OutAttribute> ByRef privacyParameters As Byte(), _
	authDigest As IAuthenticationDigest _
) As Byte()
Visual C++
public:
virtual array<unsigned char>^ Encrypt(
	array<unsigned char>^ unencryptedData, 
	int offset, 
	int length, 
	array<unsigned char>^ key, 
	int engineBoots, 
	int engineTime, 
	[OutAttribute] array<unsigned char>^% privacyParameters, 
	IAuthenticationDigest^ authDigest
) sealed

Parameters

unencryptedData
Type: array<System..::..Byte>[]()[][]
BER encoded ScopedPdu byte array that needs to be encrypted
offset
Type: System..::..Int32
Offset within the BER encoded byte array to start encryption operation from.
length
Type: System..::..Int32
Length of data to encrypt
key
Type: array<System..::..Byte>[]()[][]
Encryption key
engineBoots
Type: System..::..Int32
Authoritative engine boots value. Retrieved as part of SNMP v3 discovery process.
engineTime
Type: System..::..Int32
Authoritative engine time value. Retrieved as part of SNMP v3 discovery process.
privacyParameters
Type: array<System..::..Byte>[]()[][]%
Byte array that will receive privacy parameters information that is the result of the encryption procedure.
authDigest
Type: SnmpSharpNet..::..IAuthenticationDigest
Authentication digest reference. Not used by AES protocol and can be null

Return Value

Byte array containing encrypted ScopedPdu BER encoded data

Implements

IPrivacyProtocol..::..Encrypt(array<Byte>[]()[][], Int32, Int32, array<Byte>[]()[][], Int32, Int32, array<Byte>[]()[][]%, IAuthenticationDigest)

See Also