ParagonIE_Sodium_Crypto32::box_publickey

Advertisement

Syntax Syntax

ParagonIE_Sodium_Crypto32::box_publickey( string $keypair )

Parameters Parameters

$keypair

(string) (Required)

Return Return

(string)

Source Source

File: wp-includes/sodium_compat/src/Crypto32.php

    public static function box_publickey($keypair)
    {
        if (ParagonIE_Sodium_Core32_Util::strlen($keypair) !== ParagonIE_Sodium_Compat::CRYPTO_BOX_KEYPAIRBYTES) {
            throw new RangeException(
                'Must be ParagonIE_Sodium_Compat::CRYPTO_BOX_KEYPAIRBYTES bytes long.'
            );
        }
        return ParagonIE_Sodium_Core32_Util::substr($keypair, 32, 32);
    }

Advertisement

Advertisement

Leave a Reply

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