C# Class LitDev.LDEncryption

Mostra file Open project: litdev1/LitDev

Public Methods

Method Description
AESDecrypt ( Primitive cypher, Primitive password ) : Primitive

Decrypt an AES encrypted cypher (previously encrypted) using a password key.

AESEncrypt ( Primitive source, Primitive password ) : Primitive

Encrypt some text using AES encryption and a password key. The encrypted test can be saved to a file. Note that if you forget the password there is NO WAY to decrypt!

MD5Hash ( Primitive text ) : Primitive

Create an MD5 hash of a text input (http://wikipedia.org/wiki/MD5). This 32 character hash is recommended where a general or shorter hash is required (password or data integrity).

MD5HashFile ( Primitive fileName ) : Primitive

Create an MD5 hash of a file. This 32 character hash is for file data integrity checks (e.g. a file contents is unchanged).

SHA512Hash ( Primitive password ) : Primitive

Create a SHA2-512 hash of a text input. This 128 character hash is recommended for the most secure password encryption.

Method Details

AESDecrypt() public static method

Decrypt an AES encrypted cypher (previously encrypted) using a password key.
public static AESDecrypt ( Primitive cypher, Primitive password ) : Primitive
cypher Primitive The encrypted text (cypher).
password Primitive The password key for the encryption.
return Primitive

AESEncrypt() public static method

Encrypt some text using AES encryption and a password key. The encrypted test can be saved to a file. Note that if you forget the password there is NO WAY to decrypt!
public static AESEncrypt ( Primitive source, Primitive password ) : Primitive
source Primitive The text to encrypt.
password Primitive The password key for the encryption.
return Primitive

MD5Hash() public static method

Create an MD5 hash of a text input (http://wikipedia.org/wiki/MD5). This 32 character hash is recommended where a general or shorter hash is required (password or data integrity).
public static MD5Hash ( Primitive text ) : Primitive
text Primitive A text or password to create a hash.
return Primitive

MD5HashFile() public static method

Create an MD5 hash of a file. This 32 character hash is for file data integrity checks (e.g. a file contents is unchanged).
public static MD5HashFile ( Primitive fileName ) : Primitive
fileName Primitive The full path to a file to get the hash.
return Primitive

SHA512Hash() public static method

Create a SHA2-512 hash of a text input. This 128 character hash is recommended for the most secure password encryption.
public static SHA512Hash ( Primitive password ) : Primitive
password Primitive A text to create a hash (often a password).
return Primitive