3v4l.org

run code in 500+ PHP versions simultaneously
<?php // Secret for encryption from PAY.ON webhook configuration $encryptionKey = "2AAF35485A2BBB9196CE58DE0C88E2D3C7735A43A609A5ED9C868D17EFB8D67D"; // Headers received from webhook $ivHex = "1EDC4E012C572E7DE66EE839"; $authTagHex = "FC35831EDF2EE0C25AC2A10240CA8B97"; // Encrypted body received from webhook.site $cipherTextHex = 'PASTE_THE_COMPLETE_ENCRYPTED_BODY_HERE'; // Convert HEX values to binary $key = hex2bin($encryptionKey); $iv = hex2bin($ivHex); $authTag = hex2bin($authTagHex); $cipherText = hex2bin($cipherTextHex); // Decrypt $result = openssl_decrypt( $cipherText, 'aes-256-gcm', $key, OPENSSL_RAW_DATA, $iv, $authTag ); // Output result if ($result === false) { echo "Decryption failed"; echo PHP_EOL; echo openssl_error_string(); } else { echo "Decrypted Payload:"; echo PHP_EOL; echo $result; } ?><?php // Secret for encryption from PAY.ON webhook configuration $encryptionKey = "2AAF35485A2BBB9196CE58DE0C88E2D3C7735A43A609A5ED9C868D17EFB8D67D"; // Headers received from webhook $ivHex = "1EDC4E012C572E7DE66EE839"; $authTagHex = "FC35831EDF2EE0C25AC2A10240CA8B97"; // Encrypted body received from webhook.site $cipherTextHex = 'PASTE_THE_COMPLETE_ENCRYPTED_BODY_HERE'; // Convert HEX values to binary $key = hex2bin($encryptionKey); $iv = hex2bin($ivHex); $authTag = hex2bin($authTagHex); $cipherText = hex2bin($cipherTextHex); // Decrypt $result = openssl_decrypt( $cipherText, 'aes-256-gcm', $key, OPENSSL_RAW_DATA, $iv, $authTag ); // Output result if ($result === false) { echo "Decryption failed"; echo PHP_EOL; echo openssl_error_string(); } else { echo "Decrypted Payload:"; echo PHP_EOL; echo $result; } ?>

preferences:
21.72 ms | 475 KiB | 4 Q