Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
What is the correct code for SHA512?
Old 08-09-2008, 07:41 PM What is the correct code for SHA512?
Novice Talker

Posts: 8
Name: dummie dude
Trades: 0
I tried sha512 or sha-512 but nothing.
__________________
Dummie Dude
dummie84 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-09-2008, 07:51 PM Re: What is the correct code for SHA512?
Novice Talker

Posts: 8
Name: dummie dude
Trades: 0
Another question- what is the lastest hash? I see examples like Tiger and WHIRLPOOL.
__________________
Dummie Dude
dummie84 is offline
Reply With Quote
View Public Profile
 
Old 08-10-2008, 12:36 AM Re: What is the correct code for SHA512?
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
I use SHA512. Here's the code (PHP 5 only):

PHP Code:
$code=hash('sha512',$seed.$string_to_hash); 
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 08-10-2008, 01:10 AM Re: What is the correct code for SHA512?
Novice Talker

Posts: 8
Name: dummie dude
Trades: 0
So that would explain why I can't use it the same way as sha1()?

PHP Code:
$pass preg_replace("/[^a-zA-Z0-9]/"""sha512($_POST['pass'])); 
*I am using PHP5.
__________________
Dummie Dude

Last edited by dummie84; 08-10-2008 at 01:12 AM..
dummie84 is offline
Reply With Quote
View Public Profile
 
Old 08-10-2008, 01:12 AM Re: What is the correct code for SHA512?
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
Correct. PHP has native functions for md5 and sha1. The others are used via the hash() function.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Reply     « Reply to What is the correct code for SHA512?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.72460 seconds with 12 queries