如何使用MD5方法加密字符串? [英] How can I encrypt string using the MD5 method?

查看:228
本文介绍了如何使用MD5方法加密字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有这样做的功能?

带字符串参数,它返回字符串的加密结果



Is there a function to do this ?
with the string parameter,it return the encryption result of the string
?

推荐答案

文章< 11 ********************* @ f14g2000cwb.googlegroups。 com>,
sh*****@gmail.com < sh ***** @ gmail .COM>写道:
In article <11*********************@f14g2000cwb.googlegroups. com>,
sh*****@gmail.com <sh*****@gmail.com> wrote:
有没有这样做的功能?
带字符串参数,它返回字符串的加密结果
Is there a function to do this ?
with the string parameter,it return the encryption result of the string




MD5不是加密函数:它是一个哈希函数。


C标准没有指定加密函数。

也没有哈希函数。


有许多相当便携的MD5库。例如参见
http://sourceforge.net/projects/libmd5- rfc /


我看了上面的代码,它看起来相当

标准C - 除了那一点它试图确定机器是否是大端。或小端或小端并且它看起来好像我b $ b看起来那个测试可能不会完全是便携式的,也许是在没有完全可移植的机器上,也许是因为它们的价格不足b / b
short与int的大小相同。


-

Ceci,ce n''est pasuneidée。



MD5 is not an encryption function: it is a hash function.

There are no encryption functions specified by the C standards.
No hash functions either.

There are a number of fairly portable MD5 libraries. See for example
http://sourceforge.net/projects/libmd5-rfc/

I had a look at the above code, and it looks to be fairly
standard C -- except that at one point it attempts to determine
whether the machine is "big endian" or "little endian" and it
appears to me at first look that the test done for that might perhaps
not be completely portable, perhaps failing on machines whose
short is the same size as int.

--
Ceci, ce n''est pas une idée.


感谢您的回复!

在PHP中有一个md5()函数可以做到这一点,我想如果在C中有一个

相等的函数。

那么,有没有比MD5更好的加密方法?

Thank you for reply!
In PHP there is a md5() function to do this and I think if there is an
equal function in C.
By the way,is there any better encryption method than MD5??


sh ***** @ gmail.com 说:
感谢您的回复!
在PHP中有一个md5()函数来做这个,我想如果在C中有相同的功能。
那么,有没有比MD5更好的加密方法?
Thank you for reply!
In PHP there is a md5() function to do this and I think if there is an
equal function in C.
By the way,is there any better encryption method than MD5??




MD5不是加密方法。这是一种散列方法。


一种加密方法是否更好而不是另一个取决于你b $ b的意思是更好。快点?更容易的密钥发行?更安全? ROT-26的速度比AES更快。
。解决

AES的密钥分配问题要比OTP容易得多。 OTP比ROT-26更加安全(无限?)。


-

理查德希思菲尔德

" Usenet is一个奇怪的地方 - dmr 29/7/2005
http://www.cpax.org.uk

电子邮件:rjh在该域名(但显然放弃了www)



MD5 is not an encryption method. It''s a hashing method.

Whether one encryption method is "better" than another depends on what you
mean by "better". Faster? Easier key distro? More secure? ROT-26 is way
faster than AES. It''s much easier to solve the key distribution problem for
AES than for OTP. OTP is vastly (infinitely?) more secure than ROT-26.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/2005
http://www.cpax.org.uk
email: rjh at that domain (but drop the www, obviously)


这篇关于如何使用MD5方法加密字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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