| 1 | <?php |
||
| 6 | class EncryptedValue extends BaseEncryptedValue |
||
| 7 | { |
||
| 8 | /** @var string */ |
||
| 9 | private $envelopeKey; |
||
| 10 | /** @var string */ |
||
| 11 | private $signature; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @param string $cipherText |
||
| 15 | * @param string $method |
||
| 16 | * @param string $iv |
||
| 17 | * @param string $key |
||
| 18 | * @param string $signature |
||
| 19 | */ |
||
| 20 | 132 | public function __construct($cipherText, $method, $iv, $key, $signature) |
|
| 26 | |||
| 27 | 3 | public function jsonSerialize() |
|
| 28 | { |
||
| 29 | 3 | return parent::jsonSerialize() + [ |
|
| 30 | 3 | 'key' => base64_encode($this->envelopeKey), |
|
| 31 | 3 | 'signature' => base64_encode($this->signature), |
|
| 32 | ]; |
||
| 33 | } |
||
| 34 | |||
| 35 | 3 | public function unserialize($serialized) |
|
| 43 | |||
| 44 | /** |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | 66 | public function getEnvelopeKey() |
|
| 51 | |||
| 52 | /** |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | 93 | public function getSignature() |
|
| 59 | } |
||
| 60 |