<?php $secret_key = 'denemesmdnoandowinadanw'; echo $secret_key . PHP_EOL; $message = 'Sensitive information'; $nonce = random_bytes(SODIUM_CRYPTO_SECRETBOX_NONCEBYTES); $encrypted_message = sodium_crypto_secretbox($message, $nonce, $secret_key); $encrypted_message = sodium_bin2hex($encrypted_message); echo $encrypted_message . PHP_EOL; $encrypted_message = sodium_hex2bin($encrypted_message); $decrypted_message = sodium_crypto_secretbox_open($encrypted_message, $nonce, $secret_key);
You have javascript disabled. You will not be able to edit any code.