Code Duplication    Length = 7-7 lines in 2 locations

apps/encryption/lib/KeyManager.php 2 locations

@@ 360-366 (lines=7) @@
357
		$this->session->setStatus(Session::INIT_EXECUTED);
358
359
		try {
360
			if($this->util->isMasterKeyEnabled()) {
361
				$uid = $this->getMasterKeyId();
362
				$passPhrase = $this->getMasterKeyPassword();
363
				$privateKey = $this->getSystemPrivateKey($uid);
364
			} else {
365
				$privateKey = $this->getPrivateKey($uid);
366
			}
367
			$privateKey = $this->crypt->decryptPrivateKey($privateKey, $passPhrase, $uid);
368
		} catch (PrivateKeyMissingException $e) {
369
			return false;
@@ 424-430 (lines=7) @@
421
		if ($this->util->isMasterKeyEnabled()) {
422
			$uid = $this->getMasterKeyId();
423
			$shareKey = $this->getShareKey($path, $uid);
424
			if ($publicAccess) {
425
				$privateKey = $this->getSystemPrivateKey($uid);
426
				$privateKey = $this->crypt->decryptPrivateKey($privateKey, $this->getMasterKeyPassword(), $uid);
427
			} else {
428
				// when logged in, the master key is already decrypted in the session
429
				$privateKey = $this->session->getPrivateKey();
430
			}
431
		} else if ($publicAccess) {
432
			// use public share key for public links
433
			$uid = $this->getPublicShareKeyId();