| 1 | <?php |
||
| 31 | class OpensslBridge |
||
| 32 | { |
||
| 33 | /** |
||
| 34 | * Decrypt ciphertext. |
||
| 35 | * |
||
| 36 | * @param string $data Ciphertext to decrypt |
||
| 37 | * @param string $key Key which will be used to decrypt data |
||
| 38 | * |
||
| 39 | * @return string |
||
| 40 | */ |
||
| 41 | 28 | public static function decrypt(string $data, string $key): string |
|
| 45 | |||
| 46 | /** |
||
| 47 | * Encrypt plaintext. |
||
| 48 | * |
||
| 49 | * @param string $data Plaintext string to encrypt. |
||
| 50 | * @param string $key Key which will be used to encrypt data |
||
| 51 | * |
||
| 52 | * @return string |
||
| 53 | */ |
||
| 54 | 28 | public static function encrypt(string $data, string $key): string |
|
| 58 | } |
||
| 59 |