Skip to content

Commit

Permalink
Support phpseclib V3
Browse files Browse the repository at this point in the history
  • Loading branch information
grmeyer-hw-dev committed Jul 17, 2024
1 parent d1f76d7 commit 11118ef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Hyperwallet/Util/HyperwalletEncryption.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,11 @@ private function getPrivateKey($privateKeyData) {
array_unshift($coefficients, "phoney");
unset($coefficients[0]);

$pemData = (new RSA())->_convertPrivateKey($n, $e, $d, $primes, $exponents, $coefficients);
$privateKey = new RSA();
$pemData = RSA::_convertPrivateKey($n, $e, $d, $primes, $exponents, $coefficients);
$privateKey = RSA::loadKey($pemData);
$privateKey->loadKey($pemData);
$rsa =

if ($privateKeyData['alg'] == 'RSA-OAEP-256') {
$privateKey->setHash('sha256');
$privateKey->setMGFHash('sha256');
Expand Down

0 comments on commit 11118ef

Please sign in to comment.