| Total Complexity | 7 |
| Total Lines | 75 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | class EnvelopeData extends BasicDataStructure |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * The concealed symmetric encryption secret key property storage. |
||
| 25 | * |
||
| 26 | * @var string The encrypted secret key. |
||
| 27 | */ |
||
| 28 | protected $key = ''; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * The concealed symmetric encryption initialization vector property storage. |
||
| 32 | * |
||
| 33 | * @var string The encrypted initialization vector. |
||
| 34 | */ |
||
| 35 | protected $iv = ''; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * The encrypted information property storage. |
||
| 39 | * |
||
| 40 | * @var string The encrypted data information. |
||
| 41 | */ |
||
| 42 | protected $cipherData = ''; |
||
| 43 | |||
| 44 | /** |
||
| 45 | * The message authentication code property storage. |
||
| 46 | * |
||
| 47 | * @var string The message authentication code (tag). |
||
| 48 | */ |
||
| 49 | protected $authenticationTag = ''; |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Envelope constructor. |
||
| 53 | * |
||
| 54 | * @param string $encryptedKey The encrypted secret key. |
||
| 55 | * @param string $encryptedIv The encrypted initialization vector. |
||
| 56 | * @param string $encryptedData The encrypted message data information. |
||
| 57 | * @param string $digestionTag The message authentication code (tag). |
||
| 58 | */ |
||
| 59 | public function __construct($encryptedKey = '', $encryptedIv = '', $encryptedData = '', $digestionTag = '') |
||
| 60 | { |
||
| 61 | if (is_string($encryptedKey)) { |
||
|
1 ignored issue
–
show
|
|||
| 62 | $this->key = $encryptedKey; |
||
| 63 | } |
||
| 64 | |||
| 65 | if (is_string($encryptedIv)) { |
||
|
1 ignored issue
–
show
|
|||
| 66 | $this->iv = $encryptedIv; |
||
| 67 | } |
||
| 68 | |||
| 69 | if (is_string($encryptedData)) { |
||
|
1 ignored issue
–
show
|
|||
| 70 | $this->cipherData = $encryptedData; |
||
| 71 | } |
||
| 72 | |||
| 73 | if (is_string($digestionTag)) { |
||
|
1 ignored issue
–
show
|
|||
| 74 | $this->authenticationTag = $digestionTag; |
||
| 75 | } |
||
| 76 | } |
||
| 77 | |||
| 78 | /** |
||
| 79 | * Envelope destructor |
||
| 80 | */ |
||
| 81 | public function __destruct() |
||
| 83 | } |
||
| 84 | |||
| 85 | /** |
||
| 86 | * The envelope string representation. |
||
| 87 | * |
||
| 88 | * @return string |
||
| 89 | */ |
||
| 90 | public function __toString() |
||
| 98 |