ParagonIE_Sodium_Core32_Ed25519::seed_keypair

Advertisement

Syntax Syntax

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

Parameters Parameters

$pk

(Required)

$sk

(Required)

$seed

(Required)

Return Return

(string)

Source Source

File: wp-includes/sodium_compat/src/Core32/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