P.Z. Low Cost CPanel Web Hosting  

Go Back   P.Z. Low Cost CPanel Web Hosting > Page-Zone Web Hosting Main Forum > General FAQ > General Questions and Comments

General Questions and Comments Post your question or grace us with your knowledge. Posting limited to registered members.

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Using hash functions in php
Old
  (#1 (permalink))
webber
Registered User
webber is on a distinguished road
 
Status: Offline
Posts: 19
Join Date: Aug 2005
Rep Power: 21
Using hash functions in php - 09-06-2006, 03:30 AM

Hello,

How can I use hash functions in php?

This page
http://us3.php.net/manual/en/function.hash-algos.php

Shows the following code:
=======
<?php
print_r(hash_algos());
?>
=======

and says:

=======
The above example will output:

Array
(
[0] => md4
[1] => md5
[2] => sha1
...
=======


When I try the code on my site, I get the following error message:
Fatal error: Call to undefined function hash_algos() in /home/... on line 2

What am I doing wrong?

Thanks,
Webber
   
Reply With Quote
Old
  (#2 (permalink))
midwest
blink and it's over
midwest will become famous soon enough
 
midwest's Avatar
 
Status: Offline
Posts: 802
Join Date: Oct 2002
Location: Big Sky, MT
Rep Power: 78
09-06-2006, 06:18 AM

Unless php verson is 5.1.2 or better you need the hash extenson module.

why not
Code:
$password="thisisit";
$passhash=md5("$password");
echo "$passhash";
You have your choice of
md5()
md5_file()
sha1()
sha1_file()

you might also want to look at mcrypt or crc32 as I have no idea what you are trying to accomplish


Ronnie Gauthier
www.instaguide.com

======================
for official page-zone support please visit
www.page-zone.com/support.shtml
   
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
php functions Jim Announcements 0 08-31-2006 12:06 PM
Wrong server but domain still functions david General Questions and Comments 10 10-15-2003 03:10 PM
General Functions? h0zae CPanel Control Panel 11 07-19-2003 11:18 AM
Graphic functions in PHP eotero General Questions and Comments 2 10-17-2002 06:16 PM


Live Help



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC6
vBulletin Skin developed by: vBStyles.com
Copyright © 2002 Page-Zone Web Hosting. All rights reserved.
Smilies provided by Crack's Smilies http://www.mysmilies.com