Table of Contents

Class DataProtectionHelper<T>

Espace de noms
SecureExchangesSDK.Helpers
Assembly
SecureExchangesSDK.NetCore.dll

Data protection class. Given a type, stores a cache and helps you protect and unprotect data as the given type. On Windows, uses DPAPI (ProtectedData). On other platforms, uses AES-GCM via SecureExchangesSDK.Helpers.Internal.AesGcmProtector with a persisted master key.

public static class DataProtectionHelper<T>

Paramètres de type

T
Héritage
DataProtectionHelper<T>
Membres hérités

Methods

GetUnprotectedAsType(string, bool, byte[])

public static T GetUnprotectedAsType(string filePath, bool useCache = true, byte[] entropy = null)

Paramètres

filePath string
useCache bool
entropy byte[]

Retour

T

ProtectAndSaveToFile(string, string, byte[])

Takes the given data and protects to a filePath. Will create the file or overwrite it if already created.

public static void ProtectAndSaveToFile(string data, string filePath, byte[] entropy = null)

Paramètres

data string
filePath string
entropy byte[]

UnprotectFromFile(string, bool, byte[])

public static string UnprotectFromFile(string filePath, bool useCache = true, byte[] entropy = null)

Paramètres

filePath string
useCache bool
entropy byte[]

Retour

string