C# 클래스 Foundation.Server.Infrastructure.Helpers.AESHelper

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! If you're using this with a Web app, put the key in the web.config and encrypt the web.config.
파일 보기 프로젝트 열기: NVentimiglia/Unity3d-Foundation

보호된 프로퍼티들

프로퍼티 타입 설명
SaltSize int

공개 메소드들

메소드 설명
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.

GetPassword ( int length = 44 ) : string

random string builder

메소드 상세

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

GetPassword() 공개 정적인 메소드

random string builder
public static GetPassword ( int length = 44 ) : string
length int
리턴 string

프로퍼티 상세

SaltSize 보호되어 있는 정적으로 프로퍼티

protected static int SaltSize
리턴 int