Table of Contents

Class DefaultPrivacyProvider

Namespace
Lextm.SharpSnmpLib.Security
Assembly
SharpSnmpLib.dll

Default privacy provider.

public sealed class DefaultPrivacyProvider : IPrivacyProvider
Inheritance
DefaultPrivacyProvider
Implements
Inherited Members
Extension Methods

Constructors

DefaultPrivacyProvider(IAuthenticationProvider)

Initializes a new instance of the DefaultPrivacyProvider class.

public DefaultPrivacyProvider(IAuthenticationProvider authentication)

Parameters

authentication IAuthenticationProvider

Authentication provider.

Properties

AuthenticationProvider

Corresponding IAuthenticationProvider.

public IAuthenticationProvider AuthenticationProvider { get; }

Property Value

IAuthenticationProvider

DefaultPair

Default privacy provider with default authentication provider.

public static IPrivacyProvider DefaultPair { get; }

Property Value

IPrivacyProvider

EngineIds

Engine IDs.

public ICollection<OctetString>? EngineIds { get; set; }

Property Value

ICollection<OctetString>

Remarks

This is an optional field, and only used by TRAP v2 authentication.

Salt

Gets the salt.

public OctetString Salt { get; }

Property Value

OctetString

The salt.

Methods

Decrypt(ISnmpData, SecurityParameters)

Decrypts the specified data.

public ISnmpData Decrypt(ISnmpData data, SecurityParameters parameters)

Parameters

data ISnmpData

The data.

parameters SecurityParameters

The parameters.

Returns

ISnmpData

Encrypt(ISnmpData, SecurityParameters)

Encrypts the specified scope.

public ISnmpData Encrypt(ISnmpData data, SecurityParameters parameters)

Parameters

data ISnmpData

The scope data.

parameters SecurityParameters

The parameters.

Returns

ISnmpData

PasswordToKey(byte[], byte[])

Passwords to key.

public byte[] PasswordToKey(byte[] secret, byte[] engineId)

Parameters

secret byte[]

The secret.

engineId byte[]

The engine identifier.

Returns

byte[]

ToString()

Returns a string that represents this instance.

public override string ToString()

Returns

string

A string that represents this instance.