Password Encryption function in php - Mostlikers

09 July, 2013

Password Encryption function in php

This article is about how to password encrypt method . For an overview of cryptography technology encryption function password plain-text convert cipher-text this is use of hackers cannot read our given password. the password convert to md5 algorithm this usually needs a key-generation algorithm to randomly produce keys through to store database.

password encrption

Password its a client request to store the database for the purpose of security. but some hackers  hack to store or browser cookies password easily hack to the database. so this problem avoided to secure our password to convert hash function algorithm an MD5  (Message-Digest algorithm 5) is a widely used cryptography hash function with a 128-bit hash value to randomly generate encryption key value this value match user given password(plain text) convert to encryption key(cipher text). its very secure can't hackers hack to database store password.


User given password to change the hash function method using md5 sample md5($_POST['password'];)
to store variable.

echo $encrypt; 


Try this sample php code just enter the password to submit get the encryption code

echo $encrypt; 
<h1>Password Encryption</h1>
<form  method="post">
password <input type="password" name="password"  / >
<input type="submit" name="submit" value="dd"  />

out put



  1. Replies
    1. once you have encrypt can't again decrypt

    2. Actually, there are entire lists on the internet with password/encrypted md5 hashes out there.

      md5 hashes should *never* be used!!

      Instead, use PHP 5.5's password_* methods or for versions before 5.5, use the password compat lib.

    3. site mostly decrypt on numbers

    4. Encrypting text by using Md5 and sha1 techniques we can'nt decrypt it back to original text. By Using Base64 we can encode and decode text.Most Probably Base 64 Not used for Password Encryption