php-encrypted-streams icon indicating copy to clipboard operation
php-encrypted-streams copied to clipboard

Encrypt or decrypt streaming data of unbounded sizes. Uses PSR-7 compatible streams.

Results 5 php-encrypted-streams issues
Sort by recently updated
recently updated
newest added

When reading from an Aes*cryptionStream with ```read($length=1)``` and ```$data === "0"```, then ```return $data ? $data : '';``` just gives an empty string.

read() should only return "" after eof() became true.

Sometimes stream is read even after reaching eof. In this case hash_final is called on obsolete hashResource producing warning and destroys hash result. Checking that hash is null prevents this...

When reading from AES encrypting stream with chunk length < block size `eof()` returns `true` too early leaving a part of padding in the buffer.

In the HashingStream class an AES exception in raise. I think it's an error due to a quick copy/paste https://github.com/jeskew/php-encrypted-streams/blob/432b7b918a22fa192d93e3413bf27ec093786d35/src/HashingStream.php#L82-L83