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.


 Subscribe in a reader

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

Notices




Closed Thread
 
LinkBack Thread Tools
  #1  
Old Feb 19th, 2005, 13:17
Rob's Avatar
Rob Rob is online now
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,184
Blog Entries: 7
Thanks: 27
Thanked 22 Times in 19 Posts
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
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!

  #2  
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old Feb 19th, 2005, 18:45
Rob's Avatar
Rob Rob is online now
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,184
Blog Entries: 7
Thanks: 27
Thanked 22 Times in 19 Posts
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.
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #5  
Old Feb 20th, 2005, 05:33
Rob's Avatar
Rob Rob is online now
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,184
Blog Entries: 7
Thanks: 27
Thanked 22 Times in 19 Posts
exactly..... most of the hash was full of zero's
totally wrong. fundamentally converted WRONG. lol
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #6  
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #7  
Old Feb 20th, 2005, 08:36
Rob's Avatar
Rob Rob is online now
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,184
Blog Entries: 7
Thanks: 27
Thanked 22 Times in 19 Posts
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!
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #8  
Old Feb 20th, 2005, 12:13
Rob's Avatar
Rob Rob is online now
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,184
Blog Entries: 7
Thanks: 27
Thanked 22 Times in 19 Posts
I just tried converting the ASP one.
Every hash returned comes back as '0' LMAO!!
Oh.... deep joy. [xx(]
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
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 09:45.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization 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