File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ public function encrypt($sourcePath, $destPath)
101101 // In this scenario, request the chunk again
102102 if (
103103 ($ i + 1 < $ numberOfChunks && strlen ($ plaintext ) !== $ chunkSize )
104- || ($ i + 1 === $ numberOfChunks && $ fileSize !== strlen ($ plaintext ) + $ chunkSize * $ i )
104+ || ($ i + 1 == $ numberOfChunks && $ fileSize !== strlen ($ plaintext ) + $ chunkSize * $ i )
105105 ) {
106106 fseek ($ fpIn , $ chunkSize * $ i );
107107 continue ;
@@ -152,7 +152,7 @@ public function decrypt($sourcePath, $destPath)
152152 // In this scenario, request the chunk again
153153 if (
154154 ($ i + 1 < $ numberOfChunks && strlen ($ ciphertext ) !== $ chunkSize )
155- || ($ i + 1 === $ numberOfChunks && $ fileSize !== strlen ($ ciphertext ) + $ chunkSize * $ i )
155+ || ($ i + 1 == $ numberOfChunks && $ fileSize !== strlen ($ ciphertext ) + $ chunkSize * $ i )
156156 ) {
157157 fseek ($ fpIn , 16 + 16 * (self ::FILE_ENCRYPTION_BLOCKS + 1 ) * $ i );
158158 continue ;
You can’t perform that action at this time.
0 commit comments