From facd244b0bcaa266ecd251369b8e1873ba7b242d Mon Sep 17 00:00:00 2001 From: Mathieu Gauthier Date: Mon, 14 Feb 2022 14:02:00 -0500 Subject: [PATCH] Add cipher_algo to Openssl_seal for PHP8 --- src/Api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Api.php b/src/Api.php index 80c4e4c..2cffc0a 100644 --- a/src/Api.php +++ b/src/Api.php @@ -172,7 +172,7 @@ public function encrypt($data) { $public_key = $this->getPublicKey(); - $result = openssl_seal($plaintext, $message, $keys, array($public_key)); + $result = openssl_seal($plaintext, $message, $keys, array($public_key), 'RC4'); if ($result === FALSE || empty($keys[0]) || empty($message) || $message === $plaintext) { throw new EncryptionException('Unable to encrypt a message: ' . openssl_error_string());