From 9e586e79f1fadced93cea6b8dfa09c1bde7904c2 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Tue, 8 Mar 2016 16:56:38 -0600 Subject: [PATCH] SSH2: update libsodium calls to use 1.0.0 convention --- phpseclib/Net/SSH2.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index c94bb314..9b1003ba 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -1382,7 +1382,7 @@ class SSH2 if ($kex_algorithm === 'curve25519-sha256@libssh.org') { $x = Random::string(32); - $eBytes = \Sodium::crypto_box_publickey_from_secretkey($x); + $eBytes = \Sodium\crypto_box_publickey_from_secretkey($x); $clientKexInitMessage = NET_SSH2_MSG_KEX_ECDH_INIT; $serverKexReplyMessage = NET_SSH2_MSG_KEX_ECDH_REPLY; $kexHash = new Hash('sha256'); @@ -1527,8 +1527,8 @@ class SSH2 user_error('Received curve25519 public key of invalid length.'); return false; } - $key = new BigInteger(\Sodium::crypto_scalarmult($x, $fBytes), 256); - \Sodium::sodium_memzero($x); + $key = new BigInteger(\Sodium\crypto_scalarmult($x, $fBytes), 256); + \Sodium\memzero($x); } else { $f = new BigInteger($fBytes, -256); $key = $f->modPow($x, $prime);