WordPress at Your Fingertips
function is not described

ParagonIE_Sodium_Compat::crypto_kx_seed_keypair() public WP 1.0

{} It's a method of the class: ParagonIE_Sodium_Compat{}

No Hooks.

Return

String.

Usage

$result = ParagonIE_Sodium_Compat::crypto_kx_seed_keypair( $seed );
$seed(string) (required)
-

Code of ParagonIE_Sodium_Compat::crypto_kx_seed_keypair() WP 5.8.2

public static function crypto_kx_seed_keypair($seed)
{
    ParagonIE_Sodium_Core_Util::declareScalarType($seed, 'string', 1);

    $seed = (string) $seed;

    if (ParagonIE_Sodium_Core_Util::strlen($seed) !== self::CRYPTO_KX_SEEDBYTES) {
        throw new SodiumException('seed must be SODIUM_CRYPTO_KX_SEEDBYTES bytes');
    }

    $sk = self::crypto_generichash($seed, '', self::CRYPTO_KX_SECRETKEYBYTES);
    $pk = self::crypto_scalarmult_base($sk);
    return $sk . $pk;
}