Click or drag to resize

DataProtection Class

Provides methods for encrypting and decrypting data.
Inheritance Hierarchy
SystemObject
  GSF.Security.CryptographyDataProtection

Namespace: GSF.Security.Cryptography
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.218-beta+101eee949414e414795e55a6e73d88938f0177b8
Syntax
public class DataProtection
View Source

The DataProtection type exposes the following members.

Constructors
 NameDescription
Public methodDataProtectionInitializes a new instance of the DataProtection class
Top
Methods
 NameDescription
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodStatic memberProtect Encrypts the data in a specified byte array and returns a byte array that contains the encrypted data.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodStatic memberUnprotect Decrypts the data in a specified byte array and returns a byte array that contains the decrypted data.
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
Remarks
This is a safety wrapper around the ProtectedData class such that it can be used with LocalMachine scope regardless of current user. This is especially important for applications that may be running as user account that has no association to the current user, e.g., an Azure AD user or database account when authenticated using AdoSecurityProvider.
See Also