Re: (S.O.S) Only 4 the best programmers. About Javascript & PHP
From: Shawn Wilson (shawn_at_glassgiant.com)
Date: 02/23/04
- Next message: Cameron: "Re: FTP question"
- Previous message: Richard Hulbert: "FTP question"
- In reply to: Amilcar: "(S.O.S) Only 4 the best programmers. About Javascript & PHP"
- Next in thread: Fred H: "Re: (S.O.S) Only 4 the best programmers. About Javascript & PHP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 23 Feb 2004 14:07:27 -0400
Amilcar wrote:
>
> I've a page that sends an encrypted password, using MD5, to a PHP
> file, which is able to compare such MD5 encrypted password with an
> encryption stored on a data base. But the encryption way, on mD5, on
> JavaScript and PHP doesn't return the same value.
> My questions are:
> 1. Aren't these methods the same? I mean, the implementation on
> JavaScript and the implementation on PHP.
>
> 2. I could fix this by calling my .js file on my .php file. How can I
> do this?
>
> 3. Does anyone know about an encryption method that return the same
> value, on JavaScript and PHP?
Yeah, ego thing aside, I just tested a Javascript (IE6/Win98) md5 hash and a PHP
one. They both came out the same (though it's quite possible different browsers
will implement it differently). Before you think too hard about solutions, I'd
make sure you're using the same text for both. Make sure something stupid is
not going on, like unintentional backslashes in the text or sending "Array()"
instead of an array element or any of the common errors that you might be
overlooking.
Once you figure out what's wrong and how to fix it, you might want to reconsider
using Javascript :o)
Shawn
-- Shawn Wilson shawn@glassgiant.com http://www.glassgiant.com
- Next message: Cameron: "Re: FTP question"
- Previous message: Richard Hulbert: "FTP question"
- In reply to: Amilcar: "(S.O.S) Only 4 the best programmers. About Javascript & PHP"
- Next in thread: Fred H: "Re: (S.O.S) Only 4 the best programmers. About Javascript & PHP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|