3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
11 namespace Civi\Crypto
;
16 interface CipherSuiteInterface
{
19 * Get a list of supported cipher suites.
22 * Ex: ['aes-cbc', 'aes-bbc', 'aes-pbs']
24 public function getSuites(): array;
29 * @param string $plainText
33 * Encrypted content as a binary string.
34 * Depending on the suite, this may include related values (eg HMAC + IV).
36 public function encrypt(string $plainText, array $key): string;
41 * @param string $cipherText
42 * Encrypted content as a binary string.
43 * Depending on the suite, this may include related values (eg HMAC + IV).
49 public function decrypt(string $cipherText, array $key): string;