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.

Algorithm  

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

<?php
$password="mostlikers";
$encrypt=md5($password);
echo $encrypt; 
?>

HTML

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

<?php
$password=$_POST['password'];
$encrypt=md5($password);
echo $encrypt; 
?>
<html>
<head>
<title>Mostlikers</title>
</head>
<body>
<h1>Password Encryption</h1>
<form  method="post">
password <input type="password" name="password"  / >
<input type="submit" name="submit" value="dd"  />
</form>
</body>
</html>

out put


key

6 comments:

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

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

      md5 hashes should *never* be used!! http://www.md5decrypter.co.uk/

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

      http://php.net/manual/en/book.password.php

      Delete
    3. http://www.md5decrypter.co.uk/ site mostly decrypt on numbers

      Delete
    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

      Delete