|
@@ 371-379 (lines=9) @@
|
| 368 |
|
* @return mixed |
| 369 |
|
* @throws PrivateKeyMissingException |
| 370 |
|
*/ |
| 371 |
|
public function getPrivateKey($userId) { |
| 372 |
|
$privateKey = $this->keyStorage->getUserKey($userId, |
| 373 |
|
$this->privateKeyId, Encryption::ID); |
| 374 |
|
|
| 375 |
|
if (strlen($privateKey) !== 0) { |
| 376 |
|
return $privateKey; |
| 377 |
|
} |
| 378 |
|
throw new PrivateKeyMissingException($userId); |
| 379 |
|
} |
| 380 |
|
|
| 381 |
|
/** |
| 382 |
|
* @param $path |
|
@@ 489-496 (lines=8) @@
|
| 486 |
|
* @return mixed |
| 487 |
|
* @throws PublicKeyMissingException |
| 488 |
|
*/ |
| 489 |
|
public function getPublicKey($userId) { |
| 490 |
|
$publicKey = $this->keyStorage->getUserKey($userId, $this->publicKeyId, Encryption::ID); |
| 491 |
|
|
| 492 |
|
if (strlen($publicKey) !== 0) { |
| 493 |
|
return $publicKey; |
| 494 |
|
} |
| 495 |
|
throw new PublicKeyMissingException($userId); |
| 496 |
|
} |
| 497 |
|
|
| 498 |
|
public function getPublicShareKeyId() { |
| 499 |
|
return $this->publicShareKeyId; |