wp/wp-includes/sodium_compat/lib/stream-xchacha20.php
changeset 21 48c4eec2b7e6
parent 18 be944660c56a
child 22 8c2e4d02f4ef
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
    39     function sodium_crypto_stream_xchacha20_xor($message, $nonce, $key)
    39     function sodium_crypto_stream_xchacha20_xor($message, $nonce, $key)
    40     {
    40     {
    41         return ParagonIE_Sodium_Compat::crypto_stream_xchacha20_xor($message, $nonce, $key, true);
    41         return ParagonIE_Sodium_Compat::crypto_stream_xchacha20_xor($message, $nonce, $key, true);
    42     }
    42     }
    43 }
    43 }
       
    44 if (!is_callable('sodium_crypto_stream_xchacha20_xor_ic')) {
       
    45     /**
       
    46      * @see ParagonIE_Sodium_Compat::crypto_stream_xchacha20_xor_ic()
       
    47      * @param string $message
       
    48      * @param string $nonce
       
    49      * @param int $counter
       
    50      * @param string $key
       
    51      * @return string
       
    52      * @throws SodiumException
       
    53      * @throws TypeError
       
    54      */
       
    55     function sodium_crypto_stream_xchacha20_xor_ic($message, $nonce, $counter, $key)
       
    56     {
       
    57         return ParagonIE_Sodium_Compat::crypto_stream_xchacha20_xor_ic($message, $nonce, $counter, $key, true);
       
    58     }
       
    59 }