Browse Source

Update Encryption.php

Signed-off-by: martink-p <47943787+martink-p@users.noreply.github.com>
tags/v17.0.0beta1
martink-p 5 years ago
parent
commit
9cff71f5b0
1 changed files with 9 additions and 7 deletions
  1. 9
    7
      lib/private/Files/Stream/Encryption.php

+ 9
- 7
lib/private/Files/Stream/Encryption.php View File

@@ -317,13 +317,15 @@ class Encryption extends Wrapper {
}
/**
* Name: stream_read_block
* Description: This function is a wrapper for function stream_read.
* It calls stream read until the requested $blockSize was received or no remaining data is present.
* This is required as stream_read only returns smaller chunks of data when the stream fetches from a remote storage over the internet
* and it does not care about the given $blockSize.
* Inputs: int $blockSize. Length of requested data block in bytes
* Returns: string. data fetched from stream.
* stream_read_block
*
* This function is a wrapper for function stream_read.
* It calls stream read until the requested $blockSize was received or no remaining data is present.
* This is required as stream_read only returns smaller chunks of data when the stream fetches from a
* remote storage over the internet and it does not care about the given $blockSize.
*
* @param int $blockSize Length of requested data block in bytes
* @return string Data fetched from stream.
*/
private function stream_read_block(int $blockSize): string {
$remaining = $blockSize;

Loading…
Cancel
Save