_convertPasswordToKey(password, hashAlgorithm, saltValue, spinCount, keyBits, blockKey) {
        // Password must be in unicode buffer
        const passwordBuffer = Buffer.from(password, 'utf16le');

        // Generate the initial hash
        let key = this._hash(hashAlgorithm, saltValue, passwordBuffer);

        // Now regenerate until spin count
        for (let i = 0; i < spinCount; i++) {
            const iterator = this._createUInt32LEBuffer(i);
            key = this._hash(hashAlgorithm, iterator, key);
        }

        // Now generate the final hash
        key = this._hash(hashAlgorithm, key, blockKey);

        // Truncate or pad as needed to get to length of keyBits
        const keyBytes = keyBits / 8;
        if (key.length < keyBytes) {
            const tmp = Buffer.alloc(keyBytes, 0x36);
            key.copy(tmp);
            key = tmp;
        } else if (key.length > keyBytes) {
            key = key.slice(0, keyBytes);
        }

        return key;
    }
Convert a password into an encryption key
@param {string} password - The password
@param {string} hashAlgorithm - The hash algoritm
@param {Buffer} saltValue - The salt value
@param {number} spinCount - The spin count
@param {number} keyBits - The length of the key in bits
@param {Buffer} blockKey - The block key
@returns {Buffer} The encryption key
@private