public static function ParagonIE_Sodium_Crypto::keyExchange in Automatic Updates 7
Same name and namespace in other branches
- 8 vendor/paragonie/sodium_compat/src/Crypto.php \ParagonIE_Sodium_Crypto::keyExchange()
Libsodium's crypto_kx().
@internal Do not use this directly. Use ParagonIE_Sodium_Compat.
Parameters
string $my_sk:
string $their_pk:
string $client_pk:
string $server_pk:
Return value
string
Throws
SodiumException
TypeError
1 call to ParagonIE_Sodium_Crypto::keyExchange()
- ParagonIE_Sodium_Compat::crypto_kx in vendor/
paragonie/ sodium_compat/ src/ Compat.php - Perform a key exchange, between a designated client and a server.
File
- vendor/
paragonie/ sodium_compat/ src/ Crypto.php, line 867
Class
- ParagonIE_Sodium_Crypto
- Class ParagonIE_Sodium_Crypto
Code
public static function keyExchange($my_sk, $their_pk, $client_pk, $server_pk) {
return ParagonIE_Sodium_Compat::crypto_generichash(ParagonIE_Sodium_Compat::crypto_scalarmult($my_sk, $their_pk) . $client_pk . $server_pk);
}