public static function ParagonIE_Sodium_Compat::crypto_kx_keypair in Automatic Updates 7
Same name and namespace in other branches
- 8 vendor/paragonie/sodium_compat/src/Compat.php \ParagonIE_Sodium_Compat::crypto_kx_keypair()
Return value
string
Throws
Exception
1 call to ParagonIE_Sodium_Compat::crypto_kx_keypair()
- php72compat.php in vendor/
paragonie/ sodium_compat/ lib/ php72compat.php
File
- vendor/
paragonie/ sodium_compat/ src/ Compat.php, line 1777
Class
Code
public static function crypto_kx_keypair() {
$sk = self::randombytes_buf(self::CRYPTO_KX_SECRETKEYBYTES);
$pk = self::crypto_scalarmult_base($sk);
return $sk . $pk;
}