WordPress at Your Fingertips
function is not described

ParagonIE_Sodium_Compat::crypto_sign_seed_keypair() public WP 1.0

Generate an Ed25519 keypair from a seed.

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

No Hooks.

Return

String. Keypair

Usage

$result = ParagonIE_Sodium_Compat::crypto_sign_seed_keypair( $seed );
$seed(string) (required)
Input seed

Code of ParagonIE_Sodium_Compat::crypto_sign_seed_keypair() WP 5.8.2

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

    if (self::useNewSodiumAPI()) {
        return sodium_crypto_sign_seed_keypair($seed);
    }
    if (self::use_fallback('crypto_sign_keypair')) {
        return (string) call_user_func('\\Sodium\\crypto_sign_seed_keypair', $seed);
    }
    $publicKey = '';
    $secretKey = '';
    if (PHP_INT_SIZE === 4) {
        ParagonIE_Sodium_Core32_Ed25519::seed_keypair($publicKey, $secretKey, $seed);
    } else {
        ParagonIE_Sodium_Core_Ed25519::seed_keypair($publicKey, $secretKey, $seed);
    }
    return $secretKey . $publicKey;
}