_cryptPackage(encrypt, cipherAlgorithm, cipherChaining, hashAlgorithm, blockSize, saltValue, key, input) {
        // The first 8 bytes is supposed to be the length, but it seems like it is really the length - 4..
        const outputChunks = [];
        const offset = encrypt ? 0 : PACKAGE_OFFSET;

        // The package is encoded in chunks. Encrypt/decrypt each and concat.
        let i = 0, start = 0, end = 0;
        while (end < input.length) {
            start = end;
            end = start + PACKAGE_ENCRYPTION_CHUNK_SIZE;
            if (end > input.length) end = input.length;

            // Grab the next chunk
            let inputChunk = input.slice(start + offset, end + offset);

            // Pad the chunk if it is not an integer multiple of the block size
            const remainder = inputChunk.length % blockSize;
            if (remainder) inputChunk = Buffer.concat([inputChunk, Buffer.alloc(blockSize - remainder)]);

            // Create the initialization vector
            const iv = this._createIV(hashAlgorithm, saltValue, blockSize, i);

            // Encrypt/decrypt the chunk and add it to the array
            const outputChunk = this._crypt(encrypt, cipherAlgorithm, cipherChaining, key, iv, inputChunk);
            outputChunks.push(outputChunk);

            i++;
        }

        // Concat all of the output chunks.
        let output = Buffer.concat(outputChunks);

        if (encrypt) {
            // Put the length of the package in the first 8 bytes
            output = Buffer.concat([this._createUInt32LEBuffer(input.length, PACKAGE_OFFSET), output]);
        } else {
            // Truncate the buffer to the size in the prefix
            const length = input.readUInt32LE(0);
            output = output.slice(0, length);
        }

        return output;
    }
Encrypt/decrypt the package
@param {boolean} encrypt - True to encrypt, false to decrypt
@param {string} cipherAlgorithm - The cipher algorithm
@param {string} cipherChaining - The cipher chaining mode
@param {string} hashAlgorithm - The hash algorithm
@param {number} blockSize - The IV block size
@param {Buffer} saltValue - The salt
@param {Buffer} key - The encryption key
@param {Buffer} input - The package input
@returns {Buffer} The output
@private