pike.git / lib / modules / Crypto.pmod / Password.pmod

version» Context lines:

pike.git/lib/modules/Crypto.pmod/Password.pmod:88:   //! This is interpreted as the NT LANMANAGER (NTLM) password   //! hash. It is a hex representation of MD4 of the password.   //!   //! @value "$1$SSSSSSSS$XXXXXXXXXXXXXXXXXXXXXX"   //! The string is interpreted according to the GNU libc2 extension   //! of @expr{crypt(3C)@} where @expr{SSSSSSSS@} is up to 8 chars of   //! salt and the @expr{XXX@} string is an @[MD5]-based hash created   //! from the password and the salt. Source: GNU libc   //! @url{http://www.gnu.org/software/libtool/manual/libc/crypt.html@}.   //! + //! @value "$sha1$RRRRR$SSSSSSSS$XXXXXXXXXXXXXXXXXXXX" + //! The string is interpreted as a NetBSD-style @[SHA1.HMAC.crypt_hash()] + //! (aka @tt{crypt_sha1(3C)@}), + //! where @expr{RRRRR@} is the number of rounds (default 480000), + //! @expr{SSSSSSSS@} is a @[MIME.crypt64()] encoded salt. and the + //! @expr{XXX@} string is an @[SHA1.HMAC]-based hash created from + //! the password and the salt. + //!   //! @value "$P$RSSSSSSSSXXXXXXXXXXXXXXXXXXXXXX"   //! The string is interpreted as a PHPass' Portable Hash password hash,   //! where @expr{R@} is an encoding of the 2-logarithm of the number of   //! rounds, @expr{SSSSSSSS@} is a salt of 8 characters, and   //! @expr{XXX@} is similarily the @[MIME.encode_crypt64] of running   //! @[MD5.hash()] repeatedly on the password and the salt.   //!   //! @value "$H$RSSSSSSSS.XXXXXXXXXXXXXXXXXXXXXX"   //! Same as expr{"$P$"@} above. Used by phpBB3.   //!
pike.git/lib/modules/Crypto.pmod/Password.pmod:258: Inside #if constant(Crypto.SHA512)
   case "S": // PHPass Portable Hash SHA512.    salt = hash[..8];    hash = hash[9..];    return Crypto.SHA512.crypt_php(passwd, salt) == hash;    break;   #endif       case "sha1": // SHA1-HMAC    rounds = (int)salt;    sscanf(hash, "%s$%s", salt, hash); -  return Crypto.SHA1.HMAC.crypt_hash(password, salt, rounds) == hash; +  return Crypto.SHA1.HMAC.crypt_hash(passwd, salt, rounds) == hash;    break;    }    break;    }    return 0;   }      //! Generate a hash of @[password] suitable for @[verify()].   //!   //! @param password
pike.git/lib/modules/Crypto.pmod/Password.pmod:304:   //! of @expr{5000@} rounds.   //!   //! @value "3"   //! @value "NT"   //! The NTLM MD4 hash.   //!   //! @value "1"   //! @value "$1$"   //! @[MD5.crypt_hash()] with 48 bits of salt and @expr{1000@} rounds.   //! + //! @value "sha1" + //! @[SHA1.HMAC.crypt_hash()] with 48 bits of salt and a default + //! of @expr{480000@} rounds. + //!   //! @value "P"   //! @value "$P$"   //! @value "H"   //! @value "$H$"   //! @[MD5.crypt_php()] with 48 bits of salt and a default of   //! @expr{1<<19@} rounds. The specified number of rounds will   //! be rounded up to the closest power of @expr{2@}.   //!   //! @value "U$P$"   //! Same as @expr{"$P$"@}, the supplied @[password] is assumed to