Tag: encryption

Cryptography

Asymmetric Encryption – Public Key Encryption

Asymmetric Encryption also known as public key encryption is a type of encryption that uses two different keys for encryption and decryption. One key to encrypt the plaintext, and one key to decrypt the cyphertext. The encryption key(Public Key) is published so that anyone can encrypt a message. The decryption key(Private Key) is kept private, …

Cryptography

Popular Symmetric Encryption Algorithms

Symmetric Encryption also known as private key encryption is a type of encryption that use the same secret key for both encryption and decryption. Both sides, the sender and the receiver must know the secret key so they can encrypt and decrypt the information. Symmetric algorithms can be divided into stream algorithms and block algorithms. …

Cross-Platform, PHP

Simple AES Encryption with PHP

Today we will see how we can use mcrypt_encrypt PHP function to encrypt a plain text using AES 128! 1 2 3 4 5 6 7 8 function encrypt($plaintext, $key) { $crypt = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $plaintext, MCRYPT_MODE_ECB); return base64_encode($crypt); }function encrypt($plaintext, $key) { $crypt = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $plaintext, MCRYPT_MODE_ECB); return base64_encode($crypt); } Usage: $cipher_text = …

Browsers, Passwords

Secure your Firefox’s Saved Passwords NOW!

If you really need to save the passwords of the web sites you are visiting every day then follow the steps below to encrypt them. Otherwise disable this feature on Firefox. To disable it goto: Edit->Preferences->Security->uncheck “remember passwords for sites” or Tools->Options->Security->uncheck “remember passwords for sites” By using a master password in firefox, your data …

C#, Microsoft Windows

Hashing text with SHA-256 in C#

A simple c# method to produce hashes from plain text using SHA-256 algorithm in visual c#! 1 2 3 4 5 6 public String Hash_SHA256(String plainText) {             byte[] inputBytes = Encoding.UTF8.GetBytes(plainText);             byte[] hashedBytes = (new SHA256CryptoServiceProvider()).ComputeHash(inputBytes);             return BitConverter.ToString(hashedBytes).Replace("-", string.Empty).ToLower(); }public String Hash_SHA256(String plainText) {             byte[] inputBytes = Encoding.UTF8.GetBytes(plainText);             byte[] hashedBytes …