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
IPrivacyProviderThe privacy provider.
version
VersionCodeThe version.
header
HeaderThe header.
parameters
SecurityParametersThe parameters.
scope
ScopeThe 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
IPrivacyProviderThe privacy provider.
header
HeaderThe header.
parameters
SecurityParametersThe parameters.
rawScopeData
ISnmpDataThe 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
IPrivacyProviderThe privacy provider.
version
VersionCodeThe version.
header
HeaderThe header.
parameters
SecurityParametersThe parameters.
scopeBytes
ISnmpDataThe scope bytes.
length
byte[]The length bytes.
Returns
- bool
Returns
true
if hash matches. Otherwise, returnsfalse
.