| 1 | <?php |
||
| 9 | class DerivedKey |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | protected $salt; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | protected $networkKey; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param string $salt |
||
| 23 | * The derived key salt, or the shared secret used to generate the key. |
||
| 24 | * @param string $networkKey |
||
| 25 | * The Acquia Network key of the subscription the index is associated |
||
| 26 | * with. |
||
| 27 | */ |
||
| 28 | 9 | public function __construct($salt, $networkKey) |
|
| 33 | |||
| 34 | /** |
||
| 35 | * @return string |
||
| 36 | */ |
||
| 37 | 3 | public function getNetworkKey() |
|
| 41 | |||
| 42 | /** |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | 3 | public function getSalt() |
|
| 49 | |||
| 50 | /** |
||
| 51 | * @param string $indexId |
||
| 52 | * The unique identifier of the index, e.g. ABCD-12345. |
||
| 53 | * |
||
| 54 | * @return string |
||
| 55 | */ |
||
| 56 | 6 | public function generate($indexId) |
|
| 61 | } |
||
| 62 |