C# Класс PowerDeploy.Core.Cryptography.AES

A simple wrapper to the AesManaged class and the AES algorithm. Requires a securely stored key which should be a random string of characters that an attacker could never guess. Make sure to save the Key if you want to decrypt your data later! Stolen from https://github.com/jbubriski/Encryptamajig/blob/master/src/Encryptamajig/Encryptamajig/AesEncryptamajig.cs
Показать файл Открыть проект

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

Метод Описание
Decrypt ( string ciphertext, string key ) : string

Decrypts the ciphertext using the Key.

Encrypt ( string plainText, string key ) : string

Encrypts the plainText input using the given Key. A 128 bit random salt will be generated and prepended to the ciphertext before it is base64 encoded.

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

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

Decrypts the ciphertext using the Key.
public static Decrypt ( string ciphertext, string key ) : string
ciphertext string The ciphertext to decrypt.
key string The plain text encryption key.
Результат string

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

Encrypts the plainText input using the given Key. A 128 bit random salt will be generated and prepended to the ciphertext before it is base64 encoded.
public static Encrypt ( string plainText, string key ) : string
plainText string The plain text to encrypt.
key string The plain text encryption key.
Результат string