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

version» Context lines:

pike.git/lib/modules/Crypto.pmod/Password.pmod:256:   //! @note   //! Note that the availability of @[SHA512] depends on the version   //! of @[Nettle] that Pike has been compiled with.   //!   //! @note   //! This function was added in Pike 7.8.755.   //!   //! @seealso   //! @[verify()], @[predef::crypt()], @[Nettle.crypt_md5()],   //! @[Nettle.Hash()->crypt_hash()] - string(0..127) hash(string password, string|void scheme, int|void rounds) + string(7bit) hash(string(8bit) password, string|void scheme, int|void rounds)   { -  function(string, string, int:string(0..255)) crypt_hash; +  function(string(8bit), string(7bit), int:string(8bit)) crypt_hash;    int salt_size = 16;    int default_rounds = 5000;       string(0..127) render_crypt_hash(string(0..127) scheme, string(0..127) salt,    string(0..255) hash, int rounds)    {    if (rounds != default_rounds) {    salt = "rounds=" + rounds + "$" + salt;    }   
pike.git/lib/modules/Crypto.pmod/Password.pmod:318:    break;    case "":    return crypt(password);       case "sha":    case "{sha}":    salt_size = 0;    // FALL_THROUGH    case "ssha":    case "{ssha}": -  crypt_hash = lambda(string(8bit) passwd, string(8bit) salt, int rounds) { +  crypt_hash = lambda(string(8bit) passwd, string(7bit) salt, int rounds) {    return Crypto.SHA1.hash(passwd + salt);    };    render_hash = render_ldap_hash;    break;       case "md5":    case "{md5}":    salt_size = 0;    // FALL_THROUGH    case "smd5":