ParagonIE_Sodium_Crypto::box_secretkey

Advertisement

Syntax Syntax

ParagonIE_Sodium_Crypto::box_secretkey( string $keypair )

Parameters Parameters

$keypair

(Required)

Return Return

(string)

Source Source

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

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

Advertisement

Advertisement

Leave a Reply