Skip to content

Commit b16531f

Browse files
authored
"Unable to convert variable to GMP" fix
1 parent ad407ca commit b16531f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Encryption.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public static function encrypt($payload, $userPublicKey, $userAuthToken, $native
6060
$userPublicKeyObject = $generator->getPublicKeyFrom($pointUserPublicKey->getX(), $pointUserPublicKey->getY(), $generator->getOrder());
6161

6262
// get shared secret from user public key and local private key
63-
$sharedSecret = hex2bin($math->decHex($userPublicKeyObject->getPoint()->mul($localPrivateKeyObject->getSecret())->getX()));
63+
$sharedSecret = hex2bin($math->decHex((string) $userPublicKeyObject->getPoint()->mul($localPrivateKeyObject->getSecret())->getX()));
6464

6565
// generate salt
6666
$salt = openssl_random_pseudo_bytes(16);

0 commit comments

Comments
 (0)