diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php index 3cf8370329..410d3dd125 100644 --- a/apps/files_encryption/lib/util.php +++ b/apps/files_encryption/lib/util.php @@ -398,7 +398,8 @@ class Util { // we set the cipher // and we update the size if ($this->containHeader($path)) { - $header = fread($stream,Crypt::BLOCKSIZE); + $data = fread($stream,Crypt::BLOCKSIZE); + $header = Crypt::parseHeader($data); $cipher = Crypt::getCipher($header); $size -= Crypt::BLOCKSIZE; }