Search Results for

    Show / Hide Table of Contents

    Class StringEncryptionExtensions

    Taken from: http://stackoverflow.com/questions/165808/simple-two-way-encryption-for-c-sharp/26177005#26177005

    Inheritance
    System.Object
    StringEncryptionExtensions
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Dangl
    Assembly: Dangl.Common.dll
    Syntax
    public static class StringEncryptionExtensions

    Methods

    | Improve this Doc View Source

    DecryptString(String, String)

    Will decrypt a string given the encrypted text and a password.

    Declaration
    public static string DecryptString(this string encryptedText, string password)
    Parameters
    Type Name Description
    System.String encryptedText

    May not be null, empty or only whitespace

    System.String password

    May not be null, empty or only whitespace

    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    Encrypt(String, String, Int32)

    Returns the encrypted string.

    Declaration
    public static string Encrypt(this string plainText, string password, int pbkdf2Iterations = 1000)
    Parameters
    Type Name Description
    System.String plainText

    May not be null, empty or only whitespace

    System.String password

    May not be null, empty or only whitespace

    System.Int32 pbkdf2Iterations

    Iterations to use in the PBKDF2 password bytes derivation algorithm

    Returns
    Type Description
    System.String
    • Improve this Doc
    • View Source
    In This Article
    Back to top © Dangl IT GmbH