ParagonIE_Sodium_Core_Ed25519::seed_keypair

Advertisement

Syntax Syntax

ParagonIE_Sodium_Core_Ed25519::seed_keypair( string $pk, string $sk, string $seed )

Parameters Parameters

$pk

(string) (Required)

$sk

(string) (Required)

$seed

(string) (Required)

Return Return

(string)

Source Source

File: wp-includes/sodium_compat/src/Core/Ed25519.php

    public static function seed_keypair(&$pk, &$sk, $seed)
    {
        if (self::strlen($seed) !== self::SEED_BYTES) {
            throw new RangeException('crypto_sign keypair seed must be 32 bytes long');
        }

        /** @var string $pk */
        $pk = self::publickey_from_secretkey($seed);
        $sk = $seed . $pk;
        return $sk;
    }

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.