public static function ParagonIE_Sodium_Crypto32::keyExchange in Automatic Updates 8
Same name and namespace in other branches
- 7 vendor/paragonie/sodium_compat/src/Crypto32.php \ParagonIE_Sodium_Crypto32::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_Crypto32::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/ Crypto32.php, line 866
Class
- ParagonIE_Sodium_Crypto32
- Class ParagonIE_Sodium_Crypto
Code
public static function keyExchange($my_sk, $their_pk, $client_pk, $server_pk) {
return self::generichash(self::scalarmult($my_sk, $their_pk) . $client_pk . $server_pk);
}