You are here

public static function ParagonIE_Sodium_Core_Salsa20::salsa20_xor in Automatic Updates 8

Same name and namespace in other branches
  1. 7 vendor/paragonie/sodium_compat/src/Core/Salsa20.php \ParagonIE_Sodium_Core_Salsa20::salsa20_xor()

@internal You should not use this directly from another application

Parameters

string $message:

string $nonce:

string $key:

Return value

string

Throws

SodiumException

TypeError

2 calls to ParagonIE_Sodium_Core_Salsa20::salsa20_xor()
ParagonIE_Sodium_Crypto::secretbox in vendor/paragonie/sodium_compat/src/Crypto.php
XSalsa20-Poly1305 authenticated symmetric-key encryption.
ParagonIE_Sodium_File::secretbox_encrypt in vendor/paragonie/sodium_compat/src/File.php
Encrypt a file

File

vendor/paragonie/sodium_compat/src/Core/Salsa20.php, line 243

Class

ParagonIE_Sodium_Core_Salsa20
Class ParagonIE_Sodium_Core_Salsa20

Code

public static function salsa20_xor($message, $nonce, $key) {
  return self::xorStrings($message, self::salsa20(self::strlen($message), $nonce, $key));
}