C# Class GSoft.Dynamite.Utils.CryptoHelper

Helper class to encrypt and decrypt data using share secret
Mostrar archivo Open project: GSoft-SharePoint/Dynamite-2010

Public Methods

Method Description
DecryptStringAES ( string cipherText, string sharedSecret ) : string

Decrypt the given string. Assumes the string was encrypted using EncryptStringAES(), using an identical sharedSecret.

EncryptStringAES ( string plainText, string sharedSecret ) : string

Encrypt the given string using AES. The string can be decrypted using DecryptStringAES(). The sharedSecret parameters must match.

Private Methods

Method Description
ReadByteArray ( Stream stream ) : byte[]

Method Details

DecryptStringAES() public static method

Decrypt the given string. Assumes the string was encrypted using EncryptStringAES(), using an identical sharedSecret.
public static DecryptStringAES ( string cipherText, string sharedSecret ) : string
cipherText string The text to decrypt.
sharedSecret string A password used to generate a key for decryption.
return string

EncryptStringAES() public static method

Encrypt the given string using AES. The string can be decrypted using DecryptStringAES(). The sharedSecret parameters must match.
public static EncryptStringAES ( string plainText, string sharedSecret ) : string
plainText string The text to encrypt.
sharedSecret string A password used to generate a key for encryption.
return string