According to http://php.net/manual/en/php-user-filter.filter.php "consumed, which must always be declared by reference, should be incremented by the length of the data which your filter reads in and alters. In most cases this means you will increment consumed by $bucket->datalen for each $bucket."
So let's say you have a block cipher with a block size of 16 and you have input of length 25. At this point what you write to $bucket->data
might be 16 bytes long despite the input being 25 bytes long. So should $consumed
by 16 or 25?
And similarly, if you have input of length 5 you'd probably want to return PSFS_FEED_ME
so should $consumed
be 0 or 5?