From 0bc7d3bcf833e257fa4b2ae3b74d60bef63218b8 Mon Sep 17 00:00:00 2001 From: Sam Tuke Date: Wed, 27 Feb 2013 18:50:57 +0000 Subject: [PATCH] Added notes where to reuse old keys instead of generating new ones --- apps/files_encryption/lib/stream.php | 1 + apps/files_encryption/lib/util.php | 1 + 2 files changed, 2 insertions(+) diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php index d4b993b4c06..f4bd6f1b6b0 100644 --- a/apps/files_encryption/lib/stream.php +++ b/apps/files_encryption/lib/stream.php @@ -318,6 +318,7 @@ class Stream { // one), save the newly generated keyfile if ( ! $this->getKey() ) { + // TODO: Reuse the keyfile, it it exists, instead of making a new one $this->keyfile = Crypt::generateKey(); $this->publicKey = Keymanager::getPublicKey( $this->rootView, $this->userId ); diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php index cd223bd7029..6a18feea7df 100644 --- a/apps/files_encryption/lib/util.php +++ b/apps/files_encryption/lib/util.php @@ -692,6 +692,7 @@ class Util { // Save the recrypted key to it's owner's keyfiles directory // Save new sharekeys to all necessary user directory + // TODO: Reuse the keyfile, it it exists, instead of making a new one if ( ! Keymanager::setFileKey( $this->view, $filePath, $fileOwner, $multiEncKey['data'] ) || ! Keymanager::setShareKeys( $this->view, $filePath, $multiEncKey['keys'] ) -- 2.39.5