Added notes where to reuse old keys instead of generating new ones

This commit is contained in:
Sam Tuke 2013-02-27 18:50:57 +00:00
parent 953319a2c3
commit 0bc7d3bcf8
2 changed files with 2 additions and 0 deletions

View File

@ -318,6 +318,7 @@ class Stream {
// one), save the newly generated keyfile // one), save the newly generated keyfile
if ( ! $this->getKey() ) { if ( ! $this->getKey() ) {
// TODO: Reuse the keyfile, it it exists, instead of making a new one
$this->keyfile = Crypt::generateKey(); $this->keyfile = Crypt::generateKey();
$this->publicKey = Keymanager::getPublicKey( $this->rootView, $this->userId ); $this->publicKey = Keymanager::getPublicKey( $this->rootView, $this->userId );

View File

@ -692,6 +692,7 @@ class Util {
// Save the recrypted key to it's owner's keyfiles directory // Save the recrypted key to it's owner's keyfiles directory
// Save new sharekeys to all necessary user directory // Save new sharekeys to all necessary user directory
// TODO: Reuse the keyfile, it it exists, instead of making a new one
if ( if (
! Keymanager::setFileKey( $this->view, $filePath, $fileOwner, $multiEncKey['data'] ) ! Keymanager::setFileKey( $this->view, $filePath, $fileOwner, $multiEncKey['data'] )
|| ! Keymanager::setShareKeys( $this->view, $filePath, $multiEncKey['keys'] ) || ! Keymanager::setShareKeys( $this->view, $filePath, $multiEncKey['keys'] )