Help converting a javascript to PHP

This is a discussion on "Help converting a javascript to PHP" within the PHP Forum section. This forum, and the thread "Help converting a javascript to PHP are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Feb 19th, 2005, 13:17
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Help converting a javascript to PHP

I need help converting a Javascript to PHP (it's not my bag)

The script basically outputs a sha256 hash (I know the pear mHash library can do this, but this specific part of pear is not installed on the server)

Here is the script:-
http://opensource.hld.ca/trac.cgi/fi...256.js?rev=190

I've tried everything.... I can even get it to run with no errors, but the return value just isnt correct.

If there are any guru's who can help I'd appreciate it. (It's pretty intense)

Cheers
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work

  #2 (permalink)  
Old Feb 19th, 2005, 15:32
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
snitz has an ASP-driven sha256 script - might be easier to convert that?
  #3 (permalink)  
Old Feb 19th, 2005, 18:45
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
oh believe me..... I tried. (I failed... lol)

Javascript is much closer to PHP, so i thought that would prolly be better as a starting pad.
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
  #4 (permalink)  
Old Feb 20th, 2005, 02:36
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
When you say the return value isn't correct do you mean that it doesn't match what a different sha256 alogrithm gave?
  #5 (permalink)  
Old Feb 20th, 2005, 05:33
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
exactly..... most of the hash was full of zero's
totally wrong. fundamentally converted WRONG. lol
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
  #6 (permalink)  
Old Feb 20th, 2005, 06:40
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
any of these help?
http://devel.akbkhome.com/svn/index....ash/SHA256.php
http://www.oxxus.net/source/unix/source-sha256.htm
http://www.akbkhome.com/svn/pear/Mes...A256.php&e=912
  #7 (permalink)  
Old Feb 20th, 2005, 08:36
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
nope... sorry. I founda all them two.

The first and last link \re the pear librarys that rely on mhash (the thing we aint got) and the middle one is JSP!
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
  #8 (permalink)  
Old Feb 20th, 2005, 12:13
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
I just tried converting the ASP one.
Every hash returned comes back as '0' LMAO!!
Oh.... deep joy. [xx(]
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Closed Thread

Tags
help, converting, javascript, php

Thread Tools

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting this to css..... jahphill Web Page Design 3 Jun 9th, 2008 11:19
converting an swf into an fla danny322 Flash & Multimedia Forum 5 Feb 2nd, 2008 08:32
converting to css sliz Web Page Design 5 Aug 28th, 2007 14:30
Converting Tables to CSS Div tolis Web Page Design 8 Dec 2nd, 2005 22:00
Converting Doc to PDF or TXT to PDF on Upload ChipperT ASP.NET Forum 0 May 10th, 2005 20:29


All times are GMT. The time now is 01:56.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43