C# Class FloydPink.Flickr.Downloadr.Repository.Helpers.Crypt

Exibir arquivo Open project: flickr-downloadr/flickr-downloadr

Public Methods

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

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

Encrypt ( 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 s ) : byte[]

Method Details

Decrypt() public static method

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

Encrypt() public static method

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