_transform(chunk, encoding, callback) {
        // 'chunk' here is the node streaming chunk
        // transfer-encoding chunks should be of the format:
        // string(IntHexBase(chunk-size)) + ";chunk-signature=" +
        // signature + \r\n + chunk-data + \r\n
        // Last transfer-encoding chunk will have size 0 and no chunk-data.

        // if there was an error earlier, ignore the remaining data
        if (this.clientError) {
            return callback();
        }
        if (this.lastPieceDone) {
            const slice = chunk.slice(0, 10);
            this.log.trace('received chunk after end.' +
            'See first 10 bytes of chunk',
            { chunk: slice.toString() });
            return callback();
        }
        let unparsedChunk = chunk;
        let chunkLeftToEvaluate = true;
        return async.whilst(
            // test function
            () => chunkLeftToEvaluate,
            // async function
            done => {
                if (!this.haveMetadata) {
                    this.log.trace('do not have metadata so calling ' +
                    '_parseMetadata');
                    // need to parse our metadata
                    const parsedMetadataResults =
                        this._parseMetadata(unparsedChunk);
                    if (parsedMetadataResults.err) {
                        return done(parsedMetadataResults.err);
                    }
                    // if do not have full metadata get next chunk
                    if (!parsedMetadataResults.completeMetadata) {
                        chunkLeftToEvaluate = false;
                        return done();
                    }
                    // have metadata so reset unparsedChunk to remaining
                    // without metadata piece
                    unparsedChunk = parsedMetadataResults.unparsedChunk;
                }
                if (this.lastChunk) {
                    this.log.trace('authenticating final chunk with no data');
                    return this._authenticate(null, err => {
                        if (err) {
                            return done(err);
                        }
                        chunkLeftToEvaluate = false;
                        this.lastPieceDone = true;
                        return done();
                    });
                }
                if (unparsedChunk.length < this.seekingDataSize) {
                    // add chunk to currentData and get next chunk
                    unparsedChunk.copy(this.currentData, this.dataCursor);
                    this.dataCursor += unparsedChunk.length;
                    this.seekingDataSize -= unparsedChunk.length;
                    chunkLeftToEvaluate = false;
                    return done();
                }
                // parse just the next data piece without \r\n at the end
                // (therefore, minus 2)
                const nextDataPiece =
                    unparsedChunk.slice(0, this.seekingDataSize - 2);
                // add parsed data piece to other currentData pieces
                // so that this.currentData is the full data piece
                nextDataPiece.copy(this.currentData, this.dataCursor);
                return this._authenticate(this.currentData, err => {
                    if (err) {
                        return done(err);
                    }
                    unparsedChunk =
                        unparsedChunk.slice(this.seekingDataSize);
                    this.push(this.currentData);
                    this.haveMetadata = false;
                    this.seekingDataSize = -1;
                    this.currentData = undefined;
                    this.dataCursor = 0;
                    chunkLeftToEvaluate = unparsedChunk.length > 0;
                    return done();
                });
            },
            // final callback
            err => {
                if (err) {
                    this.clientError = true;
                    // Emit the 'clientError' event to notify
                    // listeners that the client did not provide a
                    // valid stream of content, e.g. due to a wrong
                    // signature.
                    this.emit('clientError');
                    this.errCb(err);
                }
                // get next chunk
                return callback();
            }
        );
    }
This function will parse the chunk into metadata and data,
use the metadata to authenticate with vault and send the
data on to be stored if authentication passes

@param {Buffer} chunk - chunk from request body
@param {string} encoding - Data encoding
@param {function} callback - Callback(err, justDataChunk, encoding)
@return {function} executes callback with err if applicable