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

Make eof() consider padding when reading less than block size

Open valga opened this issue 4 years ago • 1 comments

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

valga avatar Apr 12 '20 18:04 valga

Codecov Report

Merging #17 into master will not change coverage by %. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##              master       #17   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity       113       116    +3     
===========================================
  Files             12        12           
  Lines            300       304    +4     
===========================================
+ Hits             300       304    +4     
Impacted Files Coverage Δ Complexity Δ
src/AesDecryptingStream.php 100.00% <100.00%> (ø) 21.00 <0.00> (ø)
src/AesEncryptingStream.php 100.00% <100.00%> (ø) 21.00 <2.00> (+3.00)
src/AesGcmDecryptingStream.php 100.00% <100.00%> (ø) 4.00 <0.00> (ø)
src/AesGcmEncryptingStream.php 100.00% <100.00%> (ø) 5.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 432b7b9...8fc77f6. Read the comment docs.

codecov[bot] avatar Apr 12 '20 18:04 codecov[bot]