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

version» Context lines:

pike.git/lib/modules/Crypto.pmod/SCRAM.pike:146:    && iters > 0    && has_prefix(r, nonce)) {    line = [string(8bit)]sprintf("c=biws,r=%s", r);    first = [string(8bit)]sprintf("%s,r=%s,s=%s,i=%d,%s",    first[3..], r, salt, iters, line);    if (pass != "")    pass = Standards.IDNA.to_ascii(pass);    salt = MIME.decode_base64(salt);    nonce = [string(8bit)]sprintf("%s,%s,%d", pass, salt, iters);    if (!(r = .SCRAM_get_salted_password(H, nonce))) { -  r = [string(8bit)]H->pbkdf2(pass, salt, iters, H->digest_size()); +  r = [string(8bit)]H->pbkdf2([string(8bit)]pass, [string(8bit)]salt, +  iters, H->digest_size());    .SCRAM_set_salted_password([string(8bit)]r, H, nonce);    }    salt = sprintf("%s,p=%s", line, clientproof([string(8bit)]r));    first = 0; // Free memory    } else    salt = 0;    return [string(7bit)]salt;   }      //! Final server-side step in the SCRAM handshake.