DES 算法的 crypt() 函数最多只支持 8 个字符的 password, 超过 8 个字符的部分被忽略掉了; 而 MD5 算法的 crypt() 则没有这个限制. 因此现在的 passwd 命令一般用 MD5 加密方式.
From crypt's man page:
=====================
The glibc2 version of this function has the following additional features. If salt is a character string starting with the three characters "$1$" followed by at most eight characters, and optionally terminated by "$", then instead of using the DES machine, the glibc crypt function uses an MD5-based algorithm, and outputs up to 34 bytes, namely "$1$
2007-07-04
crypt(): DES or MD5
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment