Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- TypeErrors will not contain param values in backtrace --EXTENSIONS-- sodium --FIL..

Decoded Output download

--TEST--
TypeErrors will not contain param values in backtrace
--EXTENSIONS--
sodium
--FILE--
<?php
declare(strict_types=1);

function do_crypto_shorthash($message, $key) {
  return sodium_crypto_shorthash($message, $key);
}

$m = 12;
$key = random_bytes(SODIUM_CRYPTO_SHORTHASH_KEYBYTES);
$hash = do_crypto_shorthash($m, $key);
?>
--EXPECTF--
Fatal error: Uncaught TypeError: sodium_crypto_shorthash(): Argument #1 ($message) must be of type string, int given in %s:%d
Stack trace:
#0 %s(%d): sodium_crypto_shorthash()
#1 %s(%d): do_crypto_shorthash()
#2 {main}
  thrown in %s on line %d

Did this file decode correctly?

Original Code

--TEST--
TypeErrors will not contain param values in backtrace
--EXTENSIONS--
sodium
--FILE--
<?php
declare(strict_types=1);

function do_crypto_shorthash($message, $key) {
  return sodium_crypto_shorthash($message, $key);
}

$m = 12;
$key = random_bytes(SODIUM_CRYPTO_SHORTHASH_KEYBYTES);
$hash = do_crypto_shorthash($m, $key);
?>
--EXPECTF--
Fatal error: Uncaught TypeError: sodium_crypto_shorthash(): Argument #1 ($message) must be of type string, int given in %s:%d
Stack trace:
#0 %s(%d): sodium_crypto_shorthash()
#1 %s(%d): do_crypto_shorthash()
#2 {main}
  thrown in %s on line %d

Function Calls

None

Variables

None

Stats

MD5 8912625f7d368f61671ffd3f8eafa971
Eval Count 0
Decode Time 80 ms