C# Класс 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)
Показать файл Открыть проект

Открытые методы

Метод Описание
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)

Описание методов

Decrypt() публичный статический Метод

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
Результат byte[]

Decrypt() публичный статический Метод

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
Результат string

Encrypt() публичный статический Метод

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
Результат byte[]

Encrypt() публичный статический Метод

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
Результат string