Secure Exchanges SDK Documentation
Search Results for

    Show / Hide Table of Contents

    Class DataProtectionHelper<T>

    Data protection class Given a type will store cache and help you protect and unprotect data as the given type

    Inheritance
    object
    DataProtectionHelper<T>
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: SecureExchangesSDK.Helpers
    Assembly: SecureExchangesSDK.dll
    Syntax
    public static class DataProtectionHelper<T>
    Type Parameters
    Name Description
    T

    Methods

    GetUnprotectedAsType(string, bool, byte[])

    Un protect a given file

    Declaration
    public static T GetUnprotectedAsType(string filePath, bool useCache = true, byte[] entropy = null)
    Parameters
    Type Name Description
    string filePath
    bool useCache
    byte[] entropy
    Returns
    Type Description
    T

    Return the T elem declared

    ProtectAndSaveToFile(string, string, byte[])

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

    Declaration
    public static void ProtectAndSaveToFile(string data, string filePath, byte[] entropy = null)
    Parameters
    Type Name Description
    string data
    string filePath
    byte[] entropy

    UnprotectFromFile(string, bool, byte[])

    Un protect a given file

    Declaration
    public static string UnprotectFromFile(string filePath, bool useCache = true, byte[] entropy = null)
    Parameters
    Type Name Description
    string filePath
    bool useCache
    byte[] entropy
    Returns
    Type Description
    string

    Returns a json string of element

    In this article
    Back to top Secure Exchanges Inc. - Documentation