ParagonIE_Sodium_Crypto::keyExchange

Advertisement

Summery Summery

Libsodium’s crypto_kx().

Syntax Syntax

ParagonIE_Sodium_Crypto::keyExchange( string $my_sk, string $their_pk, string $client_pk, string $server_pk )

Parameters Parameters

$my_sk

(string) (Required)

$their_pk

(string) (Required)

$client_pk

(string) (Required)

$server_pk

(string) (Required)

Return Return

(string)

Source Source

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

    public static function keyExchange($my_sk, $their_pk, $client_pk, $server_pk)
    {
        return ParagonIE_Sodium_Compat::crypto_generichash(
            ParagonIE_Sodium_Compat::crypto_scalarmult($my_sk, $their_pk) .
            $client_pk .
            $server_pk
        );
    }

Advertisement

Advertisement

Leave a Reply

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