From 8b22ede5f34f4064c6b299a9fbee50e118897a5b Mon Sep 17 00:00:00 2001 From: martink-p <47943787+martink-p@users.noreply.github.com> Date: Thu, 13 Jun 2019 14:45:11 +0200 Subject: [PATCH] Update Encryption.php Signed-off-by: martink-p <47943787+martink-p@users.noreply.github.com> --- lib/private/Files/Stream/Encryption.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/private/Files/Stream/Encryption.php b/lib/private/Files/Stream/Encryption.php index 99eaff6a9c6..efa6f7c2912 100644 --- a/lib/private/Files/Stream/Encryption.php +++ b/lib/private/Files/Stream/Encryption.php @@ -317,7 +317,13 @@ class Encryption extends Wrapper { } /** - * stream_read wrapper to read complete requested block + * 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. */ private function stream_read_block(int $blockSize): string { $remaining = $blockSize;