(S.O.S)只有4名最优秀的程序员。关于Javascript& PHP [英] (S.O.S) Only 4 the best programmers. About Javascript & PHP

查看:61
本文介绍了(S.O.S)只有4名最优秀的程序员。关于Javascript& PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨:


我有一个问题:

我有一个页面,使用MD5将加密密码发送到PHP

文件,它能够将这种MD5加密密码与存储在数据库中的

加密进行比较。但加密方式,在mD5上,

JavaScript和PHP没有返回相同的值。

我的问题是:

1这些方法不一样吗?我的意思是,

JavaScript的实现和PHP上的实现。


2.我可以通过在.php文件上调用我的.js文件来解决这个问题。 。我怎么能这样做?
这样做?


3.有没有人知道一个返回相同

值的加密方法, JavaScript和PHP?


感谢很多。


Alejo。

Hi:

I have a problem:
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?

Thank''s a lot.

Alejo.

推荐答案

Amilcar写道:
Amilcar wrote:
嗨:

我有一个问题:
我有一个发送加密密码的页面,使用MD5,一个PHP
文件,它能够将这种MD5加密密码与存储在数据库中的加密进行比较。但是mD5上的加密方式,JavaScript和PHP并没有返回相同的值。
我的问题是:
1.这些方法不一样吗?我的意思是,JavaScript上的实现和PHP上的实现。

2.我可以通过在.php文件上调用我的.js文件来解决这个问题。我怎么能这样做?

3.有没有人知道在JavaScript和PHP上返回相同值的加密方法?

非常感谢。

Alejo。
Hi:

I have a problem:
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?

Thank''s a lot.

Alejo.



嗯这是一个让用户无法访问网站的天堂般的方式

没有javascript,我可以回答有问题的点,但是因为我不会把自己称为最好的程序员之一。我不会,而且这个消息

团体是公开的,像这样的主题行只打算制作

你看起来很糟糕恕我直言。


~Cameron


Mmmmm what a heavenly way to make a site totally inaccessable to users
without javascript, and I could respond to points in question but as I
wouldn''t call myself one of the best "programmers" I wont, and this news
group is public, putting subject lines like that is only going to make
you look bad IMHO.

~Cameron


Amilcar写道:
Amilcar wrote:
1.这些方法不一样吗?我的意思是,JavaScript上的实现和PHP上的实现。


算法是标准的,RFC 1321,但实现可能会有所不同。

2.我可以通过在.php上调用我的.js文件来解决这个问题。文件。我怎么能这样做?


你不能。

3.有没有人知道在JavaScript和PHP上返回相同值的加密方法?
1. Aren''t these methods the same? I mean, the implementation on
JavaScript and the implementation on PHP.
The algorithm is standard, RFC 1321, but the implementations may vary.
2. I could fix this by calling my .js file on my .php file. How can I
do this?
You can''t.
3. Does anyone know about an encryption method that return the same
value, on JavaScript and PHP?




MD5应该 - 但要记住它不是加密方法,它是单向散列的
。次要技术性;-)


首先,找出错误所在的位置。在RFC的末尾是

一些测试值。通过JS和PHP运行这些值,并看看

哪一个没有给你正确的值。如果他们都给你

正确的值(只是一个简单的打印(md5(



MD5 should - but remember it''s not "an encryption method", it''s a
one-way hash. Minor technicality ;-)

First off, work out where the error lies. At the end of the RFC are
some test values. Run these values through both JS and PHP and see
which one doesn''t give you the correct value. If they both give you the
correct value (just a simple print(md5(


值)))那么它就是

你的代码中的其他内容。


MD5("")= d41d8cd98f00b204e9800998ecf8427e

MD5(" a")= 0cc175b9c0f1b6a831c399e269772661
MD5(" abc")= 900150983cd24fb0d6963f7d28e17f72

MD5(" message digest")= f96b697d7cb7938d525a2f31aaf161d0

MD5(" abcdefghijklmnopqrstuvwxyz")= c3fcd3d76192e4007dfb496cca67e13b <登记/>
MD5(" ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv wxyz0123456789")=

d174ab98d277d9f5a5611c2c9f419d9f

MD5(" 123456789012345678901234567890123456789012345678 901234567890123456

78901234567890") = 57edf4a22be3c955ac49da2e2107b67a

干杯,

Andy
value))) then it''s something
else in your code broken.

MD5 ("") = d41d8cd98f00b204e9800998ecf8427e
MD5 ("a") = 0cc175b9c0f1b6a831c399e269772661
MD5 ("abc") = 900150983cd24fb0d6963f7d28e17f72
MD5 ("message digest") = f96b697d7cb7938d525a2f31aaf161d0
MD5 ("abcdefghijklmnopqrstuvwxyz") = c3fcd3d76192e4007dfb496cca67e13b
MD5 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv wxyz0123456789") =
d174ab98d277d9f5a5611c2c9f419d9f
MD5 ("123456789012345678901234567890123456789012345678 901234567890123456
78901234567890") = 57edf4a22be3c955ac49da2e2107b67a

Cheers,
Andy


这篇关于(S.O.S)只有4名最优秀的程序员。关于Javascript&amp; PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆