C# Класс WebApplications.Utilities.Cryptography.AESCryptographer

Наследование: ICryptoProvider
Показать файл Открыть проект

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

Метод Описание
AESCryptographer ( IEnumerable keys = null ) : System

Initializes a new instance of the AESCryptographer class.

Decrypt ( string input, bool &isLatestKey ) : string
Encrypt ( string input ) : string
TryDecrypt ( string inputString, string &decryptedString, bool &isLatestKey ) : bool

Tries the decrypt the provided input string.

Приватные методы

Метод Описание
AESCryptographer ( [ provider, IEnumerable keys = null ) : System
ConvertHexStringToByteArray ( string hexString ) : byte[]
DecryptStringFromBytes ( [ cipherText, [ key, [ initializationVector ) : string

Decrypts the array of bytes into a string.

EncryptStringToBytes ( [ input, [ key, [ initializationVector ) : byte[]

Encrypts the provided input string to an array of bytes.

TryDecryptStringFromBytes ( [ cipherText, [ key, [ initializationVector, string &decryptedString ) : bool

Tries the decrypt the encrypted text with the key specified. This is used internally to find the correct key for decryption.

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

AESCryptographer() публичный Метод

Initializes a new instance of the AESCryptographer class.
public AESCryptographer ( IEnumerable keys = null ) : System
keys IEnumerable The keys to add to this provider.
Результат System

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

public Decrypt ( string input, bool &isLatestKey ) : string
input string
isLatestKey bool
Результат string

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

public Encrypt ( string input ) : string
input string
Результат string

TryDecrypt() публичный Метод

Tries the decrypt the provided input string.
public TryDecrypt ( string inputString, string &decryptedString, bool &isLatestKey ) : bool
inputString string The string to decrypt.
decryptedString string /// The result of the decryption. /// If unsuccessful this will be . ///
isLatestKey bool /// if the string was encrypted with the latest key; otherwise . ///
Результат bool