File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php declare (strict_types=1 );
2+
3+ namespace Pdsinterop \Solid \Auth \Config ;
4+
5+ use Defuse \Crypto \Key as CryptoKey ;
6+ use League \OAuth2 \Server \CryptKey ;
7+
8+ class Keys
9+ {
10+ ////////////////////////////// CLASS PROPERTIES \\\\\\\\\\\\\\\\\\\\\\\\\\\\
11+
12+ /** @var string|CryptoKey */
13+ private $ encryptionKey ;
14+ /** @var CryptKey*/
15+ private $ privateKey ;
16+
17+ //////////////////////////// GETTERS AND SETTERS \\\\\\\\\\\\\\\\\\\\\\\\\\\
18+
19+ /** @return CryptoKey|string */
20+ final public function getEncryptionKey ()
21+ {
22+ return $ this ->encryptionKey ;
23+ }
24+
25+ /** @return CryptKey */
26+ final public function getPrivateKey () : CryptKey
27+ {
28+ return $ this ->privateKey ;
29+ }
30+
31+ //////////////////////////////// PUBLIC API \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
32+
33+ /**
34+ * Keys constructor.
35+ *
36+ * @param CryptKey $privateKey
37+ * @param string|CryptoKey $encryptionKey
38+ */
39+ final public function __construct (CryptKey $ privateKey , $ encryptionKey )
40+ {
41+ // @FIXME: Add type-check for $encryptionKey (or an extending class with different parameter type?)
42+ $ this ->encryptionKey = $ encryptionKey ;
43+ $ this ->privateKey = $ privateKey ;
44+ }
45+ }
You can’t perform that action at this time.
0 commit comments