summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2016-02-22 18:24:54 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2016-02-22 18:25:01 +0100
commit33ec70d57eedd575cdb51192c603adc77afb5ad0 (patch)
treeb0da0a05bb5185baea5e9848e0c71163038c9535
parentae2304f23f04f1d6c84f2a049a4b0fdc0c9023c6 (diff)
downloadnextcloud-server-33ec70d57eedd575cdb51192c603adc77afb5ad0.tar.gz
nextcloud-server-33ec70d57eedd575cdb51192c603adc77afb5ad0.zip
since 9.0 we have a additional parameter $position used for integrity checks
-rw-r--r--lib/public/encryption/iencryptionmodule.php18
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/public/encryption/iencryptionmodule.php b/lib/public/encryption/iencryptionmodule.php
index 45e0b79c2a9..df30dd57cee 100644
--- a/lib/public/encryption/iencryptionmodule.php
+++ b/lib/public/encryption/iencryptionmodule.php
@@ -71,29 +71,41 @@ interface IEncryptionModule {
* buffer.
*
* @param string $path to the file
+ * @param string $position id of the last block (looks like "<Number>end")
+ *
* @return string remained data which should be written to the file in case
* of a write operation
+ *
* @since 8.1.0
+ * @since 9.0.0 parameter $position added
*/
- public function end($path);
+ public function end($path, $position);
/**
* encrypt data
*
* @param string $data you want to encrypt
+ * @param string $position position of the block we want to encrypt (starts with '0')
+ *
* @return mixed encrypted data
+ *
* @since 8.1.0
+ * @since 9.0.0 parameter $position added
*/
- public function encrypt($data);
+ public function encrypt($data, $position);
/**
* decrypt data
*
* @param string $data you want to decrypt
+ * @param string $position position of the block we want to decrypt
+ *
* @return mixed decrypted data
+ *
* @since 8.1.0
+ * @since 9.0.0 parameter $position added
*/
- public function decrypt($data);
+ public function decrypt($data, $position);
/**
* update encrypted file, e.g. give additional users access to the file