pike.git / lib / modules / Sql.pmod / tds.pike

version» Context lines:

pike.git/lib/modules/Sql.pmod/tds.pike:573:    passwd = upper_case((passwd + "\0"*14)[..13]);    string hash =    ecb_encrypt(magic, passwd[..6]) +    ecb_encrypt(magic, passwd[7..]);    return encrypt_answer(hash, nonce);    }       string answer_nt_challenge(string passwd, string nonce)    {    string nt_passwd = string_to_utf16(passwd); - #if constant(Crypto.MD4) -  Crypto.MD4 md4 = Crypto.MD4(); - #else - #if constant(Crypto.md4) -  Crypto.md4 md4 = Crypto.md4(); - #else -  predef::error("MD4 hashes not supported in this Pike.\n"); -  mixed md4; - #endif - #endif -  md4->update(nt_passwd); -  return encrypt_answer(md4->digest() + "\0"*16, nonce); +  return encrypt_answer(Crypto.MD4.hash(nt_passwd) + "\0"*16, nonce);    }       protected void send_auth(string nonce)    {    int out_flag = 0x11;    Packet p = Packet();    p->put_raw("NTLMSSP\0", 8);    p->put_int(3); /* sequence 3 */    p->put_long_raw_string(answer_lan_mgr_challenge(password, nonce));    p->put_long_raw_string(answer_nt_challenge(password, nonce));