C# Class Utilities.Cryptography.ExtensionMethods.SymmetricExtensions

Symmetric key extensions
Symmetric encryption and decryption is done using RijndaelManaged provider. The provider is configured to use CBC mode and PKCS7 padding. A random IV is generated each time and attached to the cipher data. The key used in the symmetric encryption is a hash of key provided using a random salt generated using Rfc2898DeriveBytes. The random salt is stored in the cipher data, the hash is generated using a high number of iterations (>1000)
Mostra file Open project: feanz/Utilities

Public Methods

Method Description
Decrypt ( this cipherData, string key ) : byte[]

Decrypt cipher data using key provided

Symmetric encryption and decryption is done using RijndaelManaged provider. The provider is configured to use CBC mode and PKCS7 padding. A random IV is generated each time and attached to the cipher data. The key used in the symmetric encryption is a hash of key provided using a random salt generated using Rfc2898DeriveBytes. The random salt is stored in the cipher data, the hash is generated using a high number of iterations (>1000)

Decrypt ( this cipherText, string key ) : string

Decrypt cipher data using key provided

Symmetric encryption and decryption is done using RijndaelManaged provider. The provider is configured to use CBC mode and PKCS7 padding. A random IV is generated each time and attached to the cipher data. The key used in the symmetric encryption is a hash of key provided using a random salt generated using Rfc2898DeriveBytes. The random salt is stored in the cipher data, the hash is generated using a high number of iterations (>1000)

Encrypt ( this plainTextData, string key ) : byte[]

Symmetric encrypt string data using the key provided

Symmetric encryption and decryption is done using RijndaelManaged provider. The provider is configured to use CBC mode and PKCS7 padding. A random IV is generated each time and attached to the cipher data. The key used in the symmetric encryption is a hash of key provided using a random salt generated using Rfc2898DeriveBytes. The random salt is stored in the cipher data, the hash is generated using a high number of iterations (>1000)

Encrypt ( this plainText, string key ) : string

Symmetric encrypt string data using the key provided

Symmetric encryption and decryption is done using RijndaelManaged provider. The provider is configured to use CBC mode and PKCS7 padding. A random IV is generated each time and attached to the cipher data. The key used in the symmetric encryption is a hash of key provided using a random salt generated using Rfc2898DeriveBytes. The random salt is stored in the cipher data, the hash is generated using a high number of iterations (>1000)

Method Details

Decrypt() public static method

Decrypt cipher data using key provided
Symmetric encryption and decryption is done using RijndaelManaged provider. The provider is configured to use CBC mode and PKCS7 padding. A random IV is generated each time and attached to the cipher data. The key used in the symmetric encryption is a hash of key provided using a random salt generated using Rfc2898DeriveBytes. The random salt is stored in the cipher data, the hash is generated using a high number of iterations (>1000)
public static Decrypt ( this cipherData, string key ) : byte[]
cipherData this Cipher data to decrypt
key string Key to use to decrypt data
return byte[]

Decrypt() public static method

Decrypt cipher data using key provided
Symmetric encryption and decryption is done using RijndaelManaged provider. The provider is configured to use CBC mode and PKCS7 padding. A random IV is generated each time and attached to the cipher data. The key used in the symmetric encryption is a hash of key provided using a random salt generated using Rfc2898DeriveBytes. The random salt is stored in the cipher data, the hash is generated using a high number of iterations (>1000)
public static Decrypt ( this cipherText, string key ) : string
cipherText this Cipher text to decrypt
key string Key to use to decrypt data
return string

Encrypt() public static method

Symmetric encrypt string data using the key provided
Symmetric encryption and decryption is done using RijndaelManaged provider. The provider is configured to use CBC mode and PKCS7 padding. A random IV is generated each time and attached to the cipher data. The key used in the symmetric encryption is a hash of key provided using a random salt generated using Rfc2898DeriveBytes. The random salt is stored in the cipher data, the hash is generated using a high number of iterations (>1000)
public static Encrypt ( this plainTextData, string key ) : byte[]
plainTextData this The plain text data to be encrypted
key string The key to use to encrypt the data
return byte[]

Encrypt() public static method

Symmetric encrypt string data using the key provided
Symmetric encryption and decryption is done using RijndaelManaged provider. The provider is configured to use CBC mode and PKCS7 padding. A random IV is generated each time and attached to the cipher data. The key used in the symmetric encryption is a hash of key provided using a random salt generated using Rfc2898DeriveBytes. The random salt is stored in the cipher data, the hash is generated using a high number of iterations (>1000)
public static Encrypt ( this plainText, string key ) : string
plainText this The plain text to be encrypted
key string The key to use to encrypt the data
return string