Skip to content

Commit 91b7d2f

Browse files
committed
fix use statement if PHP version not supported
1 parent 85f8b5f commit 91b7d2f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/WebPush.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
use Mdanter\Ecc\Crypto\Key\PublicKey;
2020
use Mdanter\Ecc\EccFactory;
2121
use Mdanter\Ecc\Serializer\Point\UncompressedPointSerializer;
22-
use Jose\Util\GCM;
2322

2423
class WebPush
2524
{
@@ -200,7 +199,7 @@ private function encrypt($userPublicKey, $payload)
200199
// encrypt
201200
$iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-128-gcm'));
202201
if (!$this->nativePayloadEncryptionSupport) {
203-
list($encryptedText, $tag) = GCM::encrypt($encryptionKey, $iv, $payload, "");
202+
list($encryptedText, $tag) = \Jose\Util\GCM::encrypt($encryptionKey, $iv, $payload, "");
204203
$cipherText = $encryptedText.$tag;
205204
} else {
206205
$cipherText = openssl_encrypt($payload, 'aes-128-gcm', $encryptionKey, false, $iv); // base 64 encoded

0 commit comments

Comments
 (0)