Encryption
A sample encryption helper for common usage. You can also get it from NLibrary in GitHub.
Sample Usage
Base64
MD5 Hash
The MD5 message-digest algorithm is a widely used hash function producing a 128-bit hash value. Although MD5 was initially designed to be used as a cryptographic hash function, it has been found to suffer from extensive vulnerabilities. Wikipedia
An MD5 hash is a one-way transaction and as such it is almost impossible to reverse engineer an MD5 hash to retrieve the original string.
SHA-1
In cryptography, SHA-1 is a cryptographic hash function which takes an input and produces a 160-bit hash value known as a message digest – typically rendered as a hexadecimal number, 40 digits long. It was designed by the United States National Security Agency, and is a U.S. Federal Information Processing Standard. Wikipedia
Data Encryption Standard (DES)
The Data Encryption Standard is a symmetric-key algorithm for the encryption of electronic data. Although insecure, it was highly influential in the advancement of modern cryptography. Wikipedia
Note: secret key and vector must be 8 characters length
Triple DES (3DES)
In cryptography, Triple DES, officially the Triple Data Encryption Algorithm, is a symmetric-key block cipher, which applies the DES cipher algorithm three times to each data block. Wikipedia
Note: secret key must be 24 characters length and vector must be 8 characters length
Advanced Encryption Standard (AES)
The Advanced Encryption Standard, also known by its original name Rijndael, is a specification for the encryption of electronic data established by the U.S. National Institute of Standards and Technology in 2001. Wikipedia
Note: AES key accept for three different key lengths:
128 Bit - 16 ASCII characters, 1 byte each
192 Bit - 24 ASCII characters, 1 byte each
256 Bit - 32 ASCII characters, 1 byte each
Last updated