简体   繁体   English

PHP MD5实施

[英]PHP MD5 implementation

I'm currently attempting to code one for part of a college project - binary/hex handling and cryptographic functions are well regarded in the mark scheme, so I thought I'd kill two birds with one stone. 我目前正在尝试为大学项目的一部分编写一个代码-标记方案中充分考虑了二进制/十六进制处理和加密功能,因此我认为我会用一块石头杀死两只鸟。

However, the documentation availible on the algorithm itself is thorough but confusing. 但是,关于算法本身的文档非常详尽,但却令人困惑。 Is there a prexisting PHP libary/class that I could take a look at, or is there a step by step explanation of the algorithm, and the variables it uses (T and X especially) somewhere? 我是否可以看一下已有的PHP库/类,或者逐步解释该算法,以及它在某处使用的变量(特别是T和X)?

Thanks 谢谢

Get hold of a copy of Bruce Schneier's Applied Cryptography . 获取Bruce Schneier的Applied Cryptography的副本。 Although the source code is in C, he does provide an excellent background to the design principles and theory behind the algorithm. 尽管源代码使用C语言,但他确实为算法背后的设计原理和理论提供了出色的背景知识。

Wikipedia has a good write up of the algorithm (along with the valid reasons you should avoid it). Wikipedia很好地编写了该算法(以及您应避免使用该算法的正当理由)。

It also contains a full pseudocode example of its implementation. 它还包含其实现的完整伪代码示例。

这是用C语言编写的MD5。考虑到它不是PHP,所以我不知道它是否对您有帮助,但这里是: http : //www.google.com/codesearch/p?hl= zh-CN&sa=N&cd=10&ct =rc #zd_oLGoxqmg / md5.c&q = function%20md5.c%20lang:c

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM