1

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?

neubert
  • 15,947
  • 24
  • 120
  • 212
  • 1
    I really would like to know this to. In my tests, it didn't make any difference no mater to wat I set $consumed. Even random numbers, strings or to simply not do any thing whit it produced the correct output.... – Den Nov 26 '16 at 22:00

0 Answers0