使用的是OPENSSL中的EVP标准接口,现要要想对一字符串进行信息摘要,结果成功了,使用的是MD5算法,可有一点不会,就是如果要获取定长的MD5值如何实现,比如定长为8、12……20。千万不是对MD5值截取指定长度,而是设置一个什么参数。
还有,有朋友不推荐用MD5算法,我想采用SH1算法,如果SH1不支持定长,可以对SH1结果再进行MD5。熟悉这方面编程的朋友请帮帮忙,谢谢了。
还有,有朋友不推荐用MD5算法,我想采用SH1算法,如果SH1不支持定长,可以对SH1结果再进行MD5。熟悉这方面编程的朋友请帮帮忙,谢谢了。
解决方案 »
- 【求助】MFC程序调试正常,打包安装后运行,提示Runtime Error!
- 求助:如何获得浏览器正在访问的url?
- FindWindow使用问题?
- 在两个对话框类之间如何进行变量传值???
- 关于消息映射的问题
- 这是什么初始化方法?
- 屏蔽热键遇到问题!!请帮忙!!!
- 谁能告诉我,这个错误是怎么回事?f:\vc\com\drawlineclient\drawlline_i.c(51) : fatal error C1010: unexpected end of file while loo
- NT or 2000,普通用户登陆,执行程序,想得到KEY_LOCALMACHINE的访问修改权限
- Ocx中能否使用文档,视结构,救救我!
- 如何在连接点中传出自定义结构?
- 小问题
algorithm takes as input a message of arbitrary length and produces
as output a 128-bit "fingerprint" or "message digest" of the input.
It is conjectured that it is computationally infeasible to produce
two messages having the same message digest, or to produce any
message having a given prespecified target message digest. The MD5
algorithm is intended for digital signature applications, where a
large file must be "compressed" in a secure manner before being
encrypted with a private (secret) key under a public-key cryptosystem
such as RSA. The MD5 algorithm is designed to be quite fast on 32-bit machines. In
addition, the MD5 algorithm does not require any large substitution
tables; the algorithm can be coded quite compactly.rfc中指出md5的结果是128bit,不符合rfc的就不叫md5。