Table of Contents

Class PrivacyProviderExtension

Namespace
Lextm.SharpSnmpLib.Security
Assembly
SharpSnmpLib.dll

Extension class for IPrivacyProvider.

public static class PrivacyProviderExtension
Inheritance
PrivacyProviderExtension
Inherited Members

Methods

ComputeHash(IPrivacyProvider, VersionCode, Header, SecurityParameters, Scope)

Computes the hash.

public static void ComputeHash(this IPrivacyProvider privacy, VersionCode version, Header header, SecurityParameters parameters, Scope scope)

Parameters

privacy IPrivacyProvider

The privacy provider.

version VersionCode

The version.

header Header

The header.

parameters SecurityParameters

The parameters.

scope Scope

The scope.

GetScopeData(IPrivacyProvider, Header, SecurityParameters, ISnmpData)

Gets the scope data.

public static ISnmpData GetScopeData(this IPrivacyProvider privacy, Header header, SecurityParameters parameters, ISnmpData rawScopeData)

Parameters

privacy IPrivacyProvider

The privacy provider.

header Header

The header.

parameters SecurityParameters

The parameters.

rawScopeData ISnmpData

The raw scope data.

Returns

ISnmpData

ISnmpData.

Exceptions

ArgumentNullException

privacy or header

ToSecurityLevel(IPrivacyProvider)

Converts to Levels.

public static Levels ToSecurityLevel(this IPrivacyProvider privacy)

Parameters

privacy IPrivacyProvider

Returns

Levels

Levels.

VerifyHash(IPrivacyProvider, VersionCode, Header, SecurityParameters, ISnmpData, byte[]?)

Verifies the hash.

public static bool VerifyHash(this IPrivacyProvider privacy, VersionCode version, Header header, SecurityParameters parameters, ISnmpData scopeBytes, byte[]? length)

Parameters

privacy IPrivacyProvider

The privacy provider.

version VersionCode

The version.

header Header

The header.

parameters SecurityParameters

The parameters.

scopeBytes ISnmpData

The scope bytes.

length byte[]

The length bytes.

Returns

bool

Returns true if hash matches. Otherwise, returns false.