source/derivation.js
function pbkdf2(password, salt, rounds, bits) {
    return new Promise((resolve, reject) => {
        deriveKey(password, salt, rounds, bits / 8, DERIVED_KEY_ALGORITHM, (err, key) => {
            if (err) {
                return reject(err);
            }
            return resolve(key);
        });
    });
}
function pbkdf2(password, salt, rounds, bits) {
    return new Promise((resolve, reject) => {
        deriveKey(password, salt, rounds, bits / 8, DERIVED_KEY_ALGORITHM, (err, key) => {
            if (err) {
                return reject(err);
            }
            return resolve(key);
        });
    });
}
The default PBKDF2 function
@param {String} password The password to use
@param {String} salt The salt to use
@param {Number} rounds The number of iterations
@param {Number} bits The size of the key to generate, in bits
@returns {Promise.<Buffer>} A Promise that resolves with the hash