Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-inclu.../sodium_c.../lib
File: php72compat.php
try {
[500] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_box_open($ciphertext, $nonce, $key_pair);
[501] Fix | Delete
} catch (Error $ex) {
[502] Fix | Delete
return false;
[503] Fix | Delete
} catch (Exception $ex) {
[504] Fix | Delete
return false;
[505] Fix | Delete
}
[506] Fix | Delete
}
[507] Fix | Delete
}
[508] Fix | Delete
if (!is_callable('sodium_crypto_box_publickey')) {
[509] Fix | Delete
/**
[510] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_box_publickey()
[511] Fix | Delete
* @param string $key_pair
[512] Fix | Delete
* @return string
[513] Fix | Delete
* @throws SodiumException
[514] Fix | Delete
* @throws TypeError
[515] Fix | Delete
*/
[516] Fix | Delete
function sodium_crypto_box_publickey($key_pair)
[517] Fix | Delete
{
[518] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_box_publickey($key_pair);
[519] Fix | Delete
}
[520] Fix | Delete
}
[521] Fix | Delete
if (!is_callable('sodium_crypto_box_publickey_from_secretkey')) {
[522] Fix | Delete
/**
[523] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_box_publickey_from_secretkey()
[524] Fix | Delete
* @param string $secret_key
[525] Fix | Delete
* @return string
[526] Fix | Delete
* @throws SodiumException
[527] Fix | Delete
* @throws TypeError
[528] Fix | Delete
*/
[529] Fix | Delete
function sodium_crypto_box_publickey_from_secretkey($secret_key)
[530] Fix | Delete
{
[531] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_box_publickey_from_secretkey($secret_key);
[532] Fix | Delete
}
[533] Fix | Delete
}
[534] Fix | Delete
if (!is_callable('sodium_crypto_box_seal')) {
[535] Fix | Delete
/**
[536] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_box_seal()
[537] Fix | Delete
* @param string $message
[538] Fix | Delete
* @param string $public_key
[539] Fix | Delete
* @return string
[540] Fix | Delete
* @throws SodiumException
[541] Fix | Delete
* @throws TypeError
[542] Fix | Delete
*/
[543] Fix | Delete
function sodium_crypto_box_seal($message, $public_key)
[544] Fix | Delete
{
[545] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_box_seal($message, $public_key);
[546] Fix | Delete
}
[547] Fix | Delete
}
[548] Fix | Delete
if (!is_callable('sodium_crypto_box_seal_open')) {
[549] Fix | Delete
/**
[550] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_box_seal_open()
[551] Fix | Delete
* @param string $message
[552] Fix | Delete
* @param string $key_pair
[553] Fix | Delete
* @return string|bool
[554] Fix | Delete
* @throws SodiumException
[555] Fix | Delete
*/
[556] Fix | Delete
function sodium_crypto_box_seal_open($message, $key_pair)
[557] Fix | Delete
{
[558] Fix | Delete
try {
[559] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_box_seal_open($message, $key_pair);
[560] Fix | Delete
} catch (SodiumException $ex) {
[561] Fix | Delete
if ($ex->getMessage() === 'Argument 2 must be CRYPTO_BOX_KEYPAIRBYTES long.') {
[562] Fix | Delete
throw $ex;
[563] Fix | Delete
}
[564] Fix | Delete
return false;
[565] Fix | Delete
}
[566] Fix | Delete
}
[567] Fix | Delete
}
[568] Fix | Delete
if (!is_callable('sodium_crypto_box_secretkey')) {
[569] Fix | Delete
/**
[570] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_box_secretkey()
[571] Fix | Delete
* @param string $key_pair
[572] Fix | Delete
* @return string
[573] Fix | Delete
* @throws SodiumException
[574] Fix | Delete
* @throws TypeError
[575] Fix | Delete
*/
[576] Fix | Delete
function sodium_crypto_box_secretkey($key_pair)
[577] Fix | Delete
{
[578] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_box_secretkey($key_pair);
[579] Fix | Delete
}
[580] Fix | Delete
}
[581] Fix | Delete
if (!is_callable('sodium_crypto_box_seed_keypair')) {
[582] Fix | Delete
/**
[583] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_box_seed_keypair()
[584] Fix | Delete
* @param string $seed
[585] Fix | Delete
* @return string
[586] Fix | Delete
* @throws SodiumException
[587] Fix | Delete
* @throws TypeError
[588] Fix | Delete
*/
[589] Fix | Delete
function sodium_crypto_box_seed_keypair($seed)
[590] Fix | Delete
{
[591] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_box_seed_keypair($seed);
[592] Fix | Delete
}
[593] Fix | Delete
}
[594] Fix | Delete
if (!is_callable('sodium_crypto_generichash')) {
[595] Fix | Delete
/**
[596] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_generichash()
[597] Fix | Delete
* @param string $message
[598] Fix | Delete
* @param string|null $key
[599] Fix | Delete
* @param int $length
[600] Fix | Delete
* @return string
[601] Fix | Delete
* @throws SodiumException
[602] Fix | Delete
* @throws TypeError
[603] Fix | Delete
*/
[604] Fix | Delete
function sodium_crypto_generichash($message, $key = null, $length = 32)
[605] Fix | Delete
{
[606] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_generichash($message, $key, $length);
[607] Fix | Delete
}
[608] Fix | Delete
}
[609] Fix | Delete
if (!is_callable('sodium_crypto_generichash_final')) {
[610] Fix | Delete
/**
[611] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_generichash_final()
[612] Fix | Delete
* @param string|null $state
[613] Fix | Delete
* @param int $outputLength
[614] Fix | Delete
* @return string
[615] Fix | Delete
* @throws SodiumException
[616] Fix | Delete
* @throws TypeError
[617] Fix | Delete
*/
[618] Fix | Delete
function sodium_crypto_generichash_final(&$state, $outputLength = 32)
[619] Fix | Delete
{
[620] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_generichash_final($state, $outputLength);
[621] Fix | Delete
}
[622] Fix | Delete
}
[623] Fix | Delete
if (!is_callable('sodium_crypto_generichash_init')) {
[624] Fix | Delete
/**
[625] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_generichash_init()
[626] Fix | Delete
* @param string|null $key
[627] Fix | Delete
* @param int $length
[628] Fix | Delete
* @return string
[629] Fix | Delete
* @throws SodiumException
[630] Fix | Delete
* @throws TypeError
[631] Fix | Delete
*/
[632] Fix | Delete
function sodium_crypto_generichash_init($key = null, $length = 32)
[633] Fix | Delete
{
[634] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_generichash_init($key, $length);
[635] Fix | Delete
}
[636] Fix | Delete
}
[637] Fix | Delete
if (!is_callable('sodium_crypto_generichash_keygen')) {
[638] Fix | Delete
/**
[639] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_generichash_keygen()
[640] Fix | Delete
* @return string
[641] Fix | Delete
* @throws Exception
[642] Fix | Delete
*/
[643] Fix | Delete
function sodium_crypto_generichash_keygen()
[644] Fix | Delete
{
[645] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_generichash_keygen();
[646] Fix | Delete
}
[647] Fix | Delete
}
[648] Fix | Delete
if (!is_callable('sodium_crypto_generichash_update')) {
[649] Fix | Delete
/**
[650] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_generichash_update()
[651] Fix | Delete
* @param string|null $state
[652] Fix | Delete
* @param string $message
[653] Fix | Delete
* @return void
[654] Fix | Delete
* @throws SodiumException
[655] Fix | Delete
* @throws TypeError
[656] Fix | Delete
*/
[657] Fix | Delete
function sodium_crypto_generichash_update(&$state, $message = '')
[658] Fix | Delete
{
[659] Fix | Delete
ParagonIE_Sodium_Compat::crypto_generichash_update($state, $message);
[660] Fix | Delete
}
[661] Fix | Delete
}
[662] Fix | Delete
if (!is_callable('sodium_crypto_kdf_keygen')) {
[663] Fix | Delete
/**
[664] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_kdf_keygen()
[665] Fix | Delete
* @return string
[666] Fix | Delete
* @throws Exception
[667] Fix | Delete
*/
[668] Fix | Delete
function sodium_crypto_kdf_keygen()
[669] Fix | Delete
{
[670] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_kdf_keygen();
[671] Fix | Delete
}
[672] Fix | Delete
}
[673] Fix | Delete
if (!is_callable('sodium_crypto_kdf_derive_from_key')) {
[674] Fix | Delete
/**
[675] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_kdf_derive_from_key()
[676] Fix | Delete
* @param int $subkey_length
[677] Fix | Delete
* @param int $subkey_id
[678] Fix | Delete
* @param string $context
[679] Fix | Delete
* @param string $key
[680] Fix | Delete
* @return string
[681] Fix | Delete
* @throws Exception
[682] Fix | Delete
*/
[683] Fix | Delete
function sodium_crypto_kdf_derive_from_key($subkey_length, $subkey_id, $context, $key)
[684] Fix | Delete
{
[685] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_kdf_derive_from_key(
[686] Fix | Delete
$subkey_length,
[687] Fix | Delete
$subkey_id,
[688] Fix | Delete
$context,
[689] Fix | Delete
$key
[690] Fix | Delete
);
[691] Fix | Delete
}
[692] Fix | Delete
}
[693] Fix | Delete
if (!is_callable('sodium_crypto_kx')) {
[694] Fix | Delete
/**
[695] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_kx()
[696] Fix | Delete
* @param string $my_secret
[697] Fix | Delete
* @param string $their_public
[698] Fix | Delete
* @param string $client_public
[699] Fix | Delete
* @param string $server_public
[700] Fix | Delete
* @return string
[701] Fix | Delete
* @throws SodiumException
[702] Fix | Delete
* @throws TypeError
[703] Fix | Delete
*/
[704] Fix | Delete
function sodium_crypto_kx($my_secret, $their_public, $client_public, $server_public)
[705] Fix | Delete
{
[706] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_kx(
[707] Fix | Delete
$my_secret,
[708] Fix | Delete
$their_public,
[709] Fix | Delete
$client_public,
[710] Fix | Delete
$server_public
[711] Fix | Delete
);
[712] Fix | Delete
}
[713] Fix | Delete
}
[714] Fix | Delete
if (!is_callable('sodium_crypto_kx_seed_keypair')) {
[715] Fix | Delete
/**
[716] Fix | Delete
* @param string $seed
[717] Fix | Delete
* @return string
[718] Fix | Delete
* @throws Exception
[719] Fix | Delete
*/
[720] Fix | Delete
function sodium_crypto_kx_seed_keypair($seed)
[721] Fix | Delete
{
[722] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_kx_seed_keypair($seed);
[723] Fix | Delete
}
[724] Fix | Delete
}
[725] Fix | Delete
if (!is_callable('sodium_crypto_kx_keypair')) {
[726] Fix | Delete
/**
[727] Fix | Delete
* @return string
[728] Fix | Delete
* @throws Exception
[729] Fix | Delete
*/
[730] Fix | Delete
function sodium_crypto_kx_keypair()
[731] Fix | Delete
{
[732] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_kx_keypair();
[733] Fix | Delete
}
[734] Fix | Delete
}
[735] Fix | Delete
if (!is_callable('sodium_crypto_kx_client_session_keys')) {
[736] Fix | Delete
/**
[737] Fix | Delete
* @param string $client_key_pair
[738] Fix | Delete
* @param string $server_key
[739] Fix | Delete
* @return array{0: string, 1: string}
[740] Fix | Delete
* @throws SodiumException
[741] Fix | Delete
*/
[742] Fix | Delete
function sodium_crypto_kx_client_session_keys($client_key_pair, $server_key)
[743] Fix | Delete
{
[744] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_kx_client_session_keys($client_key_pair, $server_key);
[745] Fix | Delete
}
[746] Fix | Delete
}
[747] Fix | Delete
if (!is_callable('sodium_crypto_kx_server_session_keys')) {
[748] Fix | Delete
/**
[749] Fix | Delete
* @param string $server_key_pair
[750] Fix | Delete
* @param string $client_key
[751] Fix | Delete
* @return array{0: string, 1: string}
[752] Fix | Delete
* @throws SodiumException
[753] Fix | Delete
*/
[754] Fix | Delete
function sodium_crypto_kx_server_session_keys($server_key_pair, $client_key)
[755] Fix | Delete
{
[756] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_kx_server_session_keys($server_key_pair, $client_key);
[757] Fix | Delete
}
[758] Fix | Delete
}
[759] Fix | Delete
if (!is_callable('sodium_crypto_kx_secretkey')) {
[760] Fix | Delete
/**
[761] Fix | Delete
* @param string $key_pair
[762] Fix | Delete
* @return string
[763] Fix | Delete
* @throws Exception
[764] Fix | Delete
*/
[765] Fix | Delete
function sodium_crypto_kx_secretkey($key_pair)
[766] Fix | Delete
{
[767] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_kx_secretkey($key_pair);
[768] Fix | Delete
}
[769] Fix | Delete
}
[770] Fix | Delete
if (!is_callable('sodium_crypto_kx_publickey')) {
[771] Fix | Delete
/**
[772] Fix | Delete
* @param string $key_pair
[773] Fix | Delete
* @return string
[774] Fix | Delete
* @throws Exception
[775] Fix | Delete
*/
[776] Fix | Delete
function sodium_crypto_kx_publickey($key_pair)
[777] Fix | Delete
{
[778] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_kx_publickey($key_pair);
[779] Fix | Delete
}
[780] Fix | Delete
}
[781] Fix | Delete
if (!is_callable('sodium_crypto_pwhash')) {
[782] Fix | Delete
/**
[783] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_pwhash()
[784] Fix | Delete
* @param int $length
[785] Fix | Delete
* @param string $passwd
[786] Fix | Delete
* @param string $salt
[787] Fix | Delete
* @param int $opslimit
[788] Fix | Delete
* @param int $memlimit
[789] Fix | Delete
* @param int|null $algo
[790] Fix | Delete
* @return string
[791] Fix | Delete
* @throws SodiumException
[792] Fix | Delete
* @throws TypeError
[793] Fix | Delete
*/
[794] Fix | Delete
function sodium_crypto_pwhash($length, $passwd, $salt, $opslimit, $memlimit, $algo = null)
[795] Fix | Delete
{
[796] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_pwhash($length, $passwd, $salt, $opslimit, $memlimit, $algo);
[797] Fix | Delete
}
[798] Fix | Delete
}
[799] Fix | Delete
if (!is_callable('sodium_crypto_pwhash_str')) {
[800] Fix | Delete
/**
[801] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_pwhash_str()
[802] Fix | Delete
* @param string $passwd
[803] Fix | Delete
* @param int $opslimit
[804] Fix | Delete
* @param int $memlimit
[805] Fix | Delete
* @return string
[806] Fix | Delete
* @throws SodiumException
[807] Fix | Delete
* @throws TypeError
[808] Fix | Delete
*/
[809] Fix | Delete
function sodium_crypto_pwhash_str($passwd, $opslimit, $memlimit)
[810] Fix | Delete
{
[811] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_pwhash_str($passwd, $opslimit, $memlimit);
[812] Fix | Delete
}
[813] Fix | Delete
}
[814] Fix | Delete
if (!is_callable('sodium_crypto_pwhash_str_needs_rehash')) {
[815] Fix | Delete
/**
[816] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_pwhash_str_needs_rehash()
[817] Fix | Delete
* @param string $hash
[818] Fix | Delete
* @param int $opslimit
[819] Fix | Delete
* @param int $memlimit
[820] Fix | Delete
* @return bool
[821] Fix | Delete
*
[822] Fix | Delete
* @throws SodiumException
[823] Fix | Delete
*/
[824] Fix | Delete
function sodium_crypto_pwhash_str_needs_rehash($hash, $opslimit, $memlimit)
[825] Fix | Delete
{
[826] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_pwhash_str_needs_rehash($hash, $opslimit, $memlimit);
[827] Fix | Delete
}
[828] Fix | Delete
}
[829] Fix | Delete
if (!is_callable('sodium_crypto_pwhash_str_verify')) {
[830] Fix | Delete
/**
[831] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_pwhash_str_verify()
[832] Fix | Delete
* @param string $passwd
[833] Fix | Delete
* @param string $hash
[834] Fix | Delete
* @return bool
[835] Fix | Delete
* @throws SodiumException
[836] Fix | Delete
* @throws TypeError
[837] Fix | Delete
*/
[838] Fix | Delete
function sodium_crypto_pwhash_str_verify($passwd, $hash)
[839] Fix | Delete
{
[840] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_pwhash_str_verify($passwd, $hash);
[841] Fix | Delete
}
[842] Fix | Delete
}
[843] Fix | Delete
if (!is_callable('sodium_crypto_pwhash_scryptsalsa208sha256')) {
[844] Fix | Delete
/**
[845] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256()
[846] Fix | Delete
* @param int $length
[847] Fix | Delete
* @param string $passwd
[848] Fix | Delete
* @param string $salt
[849] Fix | Delete
* @param int $opslimit
[850] Fix | Delete
* @param int $memlimit
[851] Fix | Delete
* @return string
[852] Fix | Delete
* @throws SodiumException
[853] Fix | Delete
* @throws TypeError
[854] Fix | Delete
*/
[855] Fix | Delete
function sodium_crypto_pwhash_scryptsalsa208sha256($length, $passwd, $salt, $opslimit, $memlimit)
[856] Fix | Delete
{
[857] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256(
[858] Fix | Delete
$length,
[859] Fix | Delete
$passwd,
[860] Fix | Delete
$salt,
[861] Fix | Delete
$opslimit,
[862] Fix | Delete
$memlimit
[863] Fix | Delete
);
[864] Fix | Delete
}
[865] Fix | Delete
}
[866] Fix | Delete
if (!is_callable('sodium_crypto_pwhash_scryptsalsa208sha256_str')) {
[867] Fix | Delete
/**
[868] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str()
[869] Fix | Delete
* @param string $passwd
[870] Fix | Delete
* @param int $opslimit
[871] Fix | Delete
* @param int $memlimit
[872] Fix | Delete
* @return string
[873] Fix | Delete
* @throws SodiumException
[874] Fix | Delete
* @throws TypeError
[875] Fix | Delete
*/
[876] Fix | Delete
function sodium_crypto_pwhash_scryptsalsa208sha256_str($passwd, $opslimit, $memlimit)
[877] Fix | Delete
{
[878] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str($passwd, $opslimit, $memlimit);
[879] Fix | Delete
}
[880] Fix | Delete
}
[881] Fix | Delete
if (!is_callable('sodium_crypto_pwhash_scryptsalsa208sha256_str_verify')) {
[882] Fix | Delete
/**
[883] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str_verify()
[884] Fix | Delete
* @param string $passwd
[885] Fix | Delete
* @param string $hash
[886] Fix | Delete
* @return bool
[887] Fix | Delete
* @throws SodiumException
[888] Fix | Delete
* @throws TypeError
[889] Fix | Delete
*/
[890] Fix | Delete
function sodium_crypto_pwhash_scryptsalsa208sha256_str_verify($passwd, $hash)
[891] Fix | Delete
{
[892] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str_verify($passwd, $hash);
[893] Fix | Delete
}
[894] Fix | Delete
}
[895] Fix | Delete
if (!is_callable('sodium_crypto_scalarmult')) {
[896] Fix | Delete
/**
[897] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_scalarmult()
[898] Fix | Delete
* @param string $n
[899] Fix | Delete
* @param string $p
[900] Fix | Delete
* @return string
[901] Fix | Delete
* @throws SodiumException
[902] Fix | Delete
* @throws TypeError
[903] Fix | Delete
*/
[904] Fix | Delete
function sodium_crypto_scalarmult($n, $p)
[905] Fix | Delete
{
[906] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_scalarmult($n, $p);
[907] Fix | Delete
}
[908] Fix | Delete
}
[909] Fix | Delete
if (!is_callable('sodium_crypto_scalarmult_base')) {
[910] Fix | Delete
/**
[911] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_scalarmult_base()
[912] Fix | Delete
* @param string $n
[913] Fix | Delete
* @return string
[914] Fix | Delete
* @throws SodiumException
[915] Fix | Delete
* @throws TypeError
[916] Fix | Delete
*/
[917] Fix | Delete
function sodium_crypto_scalarmult_base($n)
[918] Fix | Delete
{
[919] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_scalarmult_base($n);
[920] Fix | Delete
}
[921] Fix | Delete
}
[922] Fix | Delete
if (!is_callable('sodium_crypto_secretbox')) {
[923] Fix | Delete
/**
[924] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_secretbox()
[925] Fix | Delete
* @param string $message
[926] Fix | Delete
* @param string $nonce
[927] Fix | Delete
* @param string $key
[928] Fix | Delete
* @return string
[929] Fix | Delete
* @throws SodiumException
[930] Fix | Delete
* @throws TypeError
[931] Fix | Delete
*/
[932] Fix | Delete
function sodium_crypto_secretbox($message, $nonce, $key)
[933] Fix | Delete
{
[934] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_secretbox($message, $nonce, $key);
[935] Fix | Delete
}
[936] Fix | Delete
}
[937] Fix | Delete
if (!is_callable('sodium_crypto_secretbox_keygen')) {
[938] Fix | Delete
/**
[939] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_secretbox_keygen()
[940] Fix | Delete
* @return string
[941] Fix | Delete
* @throws Exception
[942] Fix | Delete
*/
[943] Fix | Delete
function sodium_crypto_secretbox_keygen()
[944] Fix | Delete
{
[945] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_secretbox_keygen();
[946] Fix | Delete
}
[947] Fix | Delete
}
[948] Fix | Delete
if (!is_callable('sodium_crypto_secretbox_open')) {
[949] Fix | Delete
/**
[950] Fix | Delete
* @see ParagonIE_Sodium_Compat::crypto_secretbox_open()
[951] Fix | Delete
* @param string $ciphertext
[952] Fix | Delete
* @param string $nonce
[953] Fix | Delete
* @param string $key
[954] Fix | Delete
* @return string|bool
[955] Fix | Delete
*/
[956] Fix | Delete
function sodium_crypto_secretbox_open($ciphertext, $nonce, $key)
[957] Fix | Delete
{
[958] Fix | Delete
try {
[959] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_secretbox_open($ciphertext, $nonce, $key);
[960] Fix | Delete
} catch (Error $ex) {
[961] Fix | Delete
return false;
[962] Fix | Delete
} catch (Exception $ex) {
[963] Fix | Delete
return false;
[964] Fix | Delete
}
[965] Fix | Delete
}
[966] Fix | Delete
}
[967] Fix | Delete
if (!is_callable('sodium_crypto_secretstream_xchacha20poly1305_init_push')) {
[968] Fix | Delete
/**
[969] Fix | Delete
* @param string $key
[970] Fix | Delete
* @return array<int, string>
[971] Fix | Delete
* @throws SodiumException
[972] Fix | Delete
*/
[973] Fix | Delete
function sodium_crypto_secretstream_xchacha20poly1305_init_push($key)
[974] Fix | Delete
{
[975] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_secretstream_xchacha20poly1305_init_push($key);
[976] Fix | Delete
}
[977] Fix | Delete
}
[978] Fix | Delete
if (!is_callable('sodium_crypto_secretstream_xchacha20poly1305_push')) {
[979] Fix | Delete
/**
[980] Fix | Delete
* @param string $state
[981] Fix | Delete
* @param string $message
[982] Fix | Delete
* @param string $additional_data
[983] Fix | Delete
* @param int $tag
[984] Fix | Delete
* @return string
[985] Fix | Delete
* @throws SodiumException
[986] Fix | Delete
*/
[987] Fix | Delete
function sodium_crypto_secretstream_xchacha20poly1305_push(
[988] Fix | Delete
&$state,
[989] Fix | Delete
$message,
[990] Fix | Delete
$additional_data = '',
[991] Fix | Delete
$tag = 0
[992] Fix | Delete
) {
[993] Fix | Delete
return ParagonIE_Sodium_Compat::crypto_secretstream_xchacha20poly1305_push(
[994] Fix | Delete
$state,
[995] Fix | Delete
$message,
[996] Fix | Delete
$additional_data,
[997] Fix | Delete
$tag
[998] Fix | Delete
);
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function