• Home
  • About Us
  • Privacy Policy
Tobby News
  • How To:
  • Linux
  • Programming
    • AJAX
    • Android
    • HTML, CSS
    • Javascript
    • jQuery
    • php
  • Blogging
    • Internet Marketing
    • SEO
  • Wordpress
  • Social Media
  • General
  • Joomla
  • Photoshop
  • Windows
0


6 Ways to Encrypt Password in PHP

Dated: 10/04/2012   Author:prasad php

  • Tweet
  • Share
  • Email
  • CevherShare
  • Tweet
  • Share
  • Email

PHP allows to encrypt the password by easy functions. Here is the six ways to encrypt the passwords.

Hash_hmac

hash_hmac — Generate a keyed hash value using the HMAC method

1
2
3
<?php
echo hash_hmac('ripemd160', 'Stay foolish, stay hungry.', 'secret');
?>

OUTPUT:

d96e9683178a9d6defedde594f7e1944cf8864b6

hash

hash — Generate a hash value (message digest)

1
2
3
<?php
echo hash('ripemd160', 'Stay foolish, stay hungry.');
?>

OUTPUT:

2f86cf7076249485b549ffc137ab644cb9c9e67a

sha1

sha1 — Calculate the sha1 hash of a string

1
2
3
<?php
echo sha1('tobbynews');
?>

OUTPUT:

bbb6cc2fc4f0d1cc7d230032d8bca24adc73837c

md5

md5 — Calculate the md5 hash of a string

1
2
3
<?php
echo md5('tobbynews');
?>

OUTPUT:

6288a589247f3ab3231fc9a86e624ac8

crc32

crc32 — Calculates the crc32 polynomial of a string

Generates the cyclic redundancy checksum polynomial of 32-bit lengths of the str. This is usually used to validate the integrity of data being transmitted.

1
2
3
<?php
echo crc32('Stay foolish, stay hungry.');
?>

OUTPUT:

1875988720

crypt

1
2
3
<?php
echo crypt('Stay foolish, stay hungry.');
?>

OUTPUT:

$1$hT2.WM..$yg8axgz8RQxQOdLqZYFpB1

prasad

About prasad

Prasad K has written 111 post in this blog.

  • View all posts by prasad →
  • Blog
  • Google+

Related posts:

  1. Simple Php Login Script
  2. Javascript Alert Box in PHP
encrypt password in php, password encryption in php, password encryption in php for login page
Cancel Reply

        


Follow @Recruitrider

  • Popular Posts

    • User Registration form in PHP and MySQL
    • Warning: Missing required field entry title | Missing required field updated | Missing required hCard author
    • Submitting Form without Using Submit button in JavaScript
    • How To: Insert Data into MySQL Database Using Drop Down Box in PHP
    • what is difference between mysql_fetch_array(), mysql_fetch_row(), mysql_fetch_assoc() and mysql_fetch_object() in php
    • PHP Code to Get IP address of Website Visitor
    • Javascript Alert Box in PHP
    • Difference Between Client Side and Server Side Language
    • How To: Insert Data into Database using Check Box in PHP
    • Proxy Server Configuration to Block Website Access in Redhat
  • Recent Posts

    • Sending E-Mail with PHP

      PHP  is a  powerful tool to develop a dynamic site. E-mail is also included in the PHP. Codes to sending e-mail is not a complex or Read More »
    • joomla administration page

      How To:Install Joomla

      Joomla is very powerful Content management System. Day to Day Joomla is gaining Developers for the Website Development. There are Many more Cool Features in the Read More »
    • tobby-news1

      How To:Create a GIF Image With Photoshop

      GIF is the Graphical Interchange Format. Gif is an image but there will be an animation or some moving objects in the Image. The GIF files Read More »
    • disk properties window

      How to: Lock A Drive or Folder in Windows 7 and XP

      Security is an essential thing for the computer, most of the Data in the computer will be personal to the User. So, some data stored in Read More »
    • Logon-screen1

      How to: Create A Single Page Website with HTML

      In The Website Designing there are many more page designing methods. The Single page site designing is also a attractive and it looks awesome. This is Read More »
    • Code Behind part to setup a Enquiry form in a ASP.Net Website

      To Setup a Enquiry form in a ASP.Net Website Add this Namespaces in your Codebehind file: using System.Net.Mail; using System.Net; Desription: The System.Net.Mail namespace contains classes Read More »
    • Gmail Compose Message New Interface

      Gmail compose message new interface looks awesome when compared to old one. Google has introduced a new interface in gmail’s compose message. In older version of gmail’s Read More »
    • Google Earth For Linux RedHat 4.0 to 5.4

        Google Earth is a software interface for the Google maps. t is an Extreme application for the Google maps. Thus the Google maps is available for the UNIX Read More »
  • Blogger Badge

    IndiBlogger - The Largest Indian Blogger Community
  • Search

© 2013 Tobby News
Powered by WordPress | Designed by: Online Remote Desktop | Thanks to Hosted Exchange 2010, Web based Project Management and What is SharePoint?