Skip to content

Commit b44a4c4

Browse files
authored
Merge pull request #24 from SPAHI4/master
"Unable to convert variable to GMP" fix
2 parents ad407ca + b16531f commit b44a4c4

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)