3v4l.org

run code in 300+ PHP versions simultaneously
<?php $my_secret = sodium_hex2bin("da93b1db433cfb2efe490a1bb263e440b586b6167c20b86f14cd058515806940"); $my_public = sodium_crypto_scalarmult_base($my_secret); $message = sodium_crypto_box_seal("This is a secret", $my_public); var_dump(sodium_bin2hex($message)); $opened = sodium_crypto_box_seal_open($message, $my_secret . $my_public); var_dump($opened);

preferences:
22.94 ms | 404 KiB | 5 Q