3v4l.org

run code in 300+ PHP versions simultaneously
<?php //echo openssl_cipher_iv_length('aes-256-gcm'); $secret="This is a secret message."; $key="d8b163deda806acaede2f807"; echo $iv=openssl_random_pseudo_bytes(12); $iv = "0e42519c0eda67c22c52b605ff41fde395880ebf6ed40a560b5f5ecc8183d26a"; $method="aes-256-gcm"; $encrypted = "95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7"; //$encrypted=openssl_encrypt($secret,$method,$key,false,$iv); $decrypted=openssl_decrypt($encrypted,$method,$key,false,$iv); echo $encrypted; echo "<br>"; echo $decrypted;
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.33, 7.4.3 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Fatal error: Uncaught Error: Call to undefined function openssl_random_pseudo_bytes() in /in/mYosf:8 Stack trace: #0 {main} thrown in /in/mYosf on line 8
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Fatal error: Uncaught Error: Call to undefined function openssl_random_pseudo_bytes() in /in/mYosf:8 Stack trace: #0 {main} thrown in /in/mYosf on line 8
Process exited with code 255.
Output for 7.2.0
�[^�D�b�X�e95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 7.1.7
,�l=,/�j�/95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 7.1.6
'����\VS95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 7.1.5
E V�`�p��0��95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 7.1.0
PVF�:K��k5Ok95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 7.0.20
P_W""��6P �K Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 7.0.6
�?�:Մ�Àʎ� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 7.0.5
��AO"�� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 7.0.4
~3,�M)�g9Ƌ Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 7.0.3
��Tzȓaϗ� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 7.0.2
p�����ĺ Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 7.0.1
�)�v�8k�d� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 7.0.0
ꑋ�/q�+o2VH Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.6.28
6��y�Dj�.p҅ Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.6.21
G��I��@2qn� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.6.20
��9��[� p� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.6.19
�Ws`F��' Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.6.18
�8�;`���� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.6.17
>�3t��ȞN�B Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.6.16
R��n��l�?e� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.6.15
� �M��t (X Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.6.14
-}u�0ĥ')�I Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.6.13
���/͒���� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.6.12
��PU�"G Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.6.11
@��h�x��6� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.6.10
-u~�fd�|`� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.6.9
���t���>�s Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.6.8
n1�иO�{��0 Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.6.7
��8��Tn�B Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.5.35
s�$-��� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.5.34
��� [�� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.5.33
�S��C)N� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.5.32
��b�Nn$�c�� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.5.31
9�P���e<�� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.5.30
��p��1!��j�y Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.5.29
����� -� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.5.28
ŝ�� �]��& Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.5.27
�?ucfr��j �r Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.5.26
,���4%� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.5.25
��3�Ng���cΆ Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.5.24
��� �� 3�` Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.45
6\֊�_�f�cf Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.44
���R���� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.43
���ۄqj�ױ� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.42
b�W̛�7"{� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.41
�L{^�F�ޖ� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.40
)_0H�=K�;�� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.39
H=q1@/���Z Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.38
k!�жr��^� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.37
���E?��K*j Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.36
��ѹ6�!�I��~ Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.35
O��w�C ���� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.34
�۾#�^{�A�� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.32
����j?<�� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.31
�j���r� �7� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.30
YP�P���Oݸ0 Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.29
���E��T�� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.28
� �pl�<&i� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.27
H j�;�h�ʕ�� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.26
סxdJ�D���| Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.25
*�E�;�G�� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.24
##�����O� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.23
�2��?}�4 Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.22
�{3�����v -� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.21
4+���]�u�M Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.14, 5.4.20
Fatal error: Call to undefined function openssl_random_pseudo_bytes() in /in/mYosf on line 8
Process exited with code 255.
Output for 5.4.19
�?�Rڟ��ғ Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.18
*��jB?���� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.17
�aŜ�G��r� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.16
ğ~�ԏ'�.�� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 5.4.15
#\*��h_Z���� Warning: openssl_decrypt(): IV passed is 64 bytes long which is longer than the 12 expected by selected cipher, truncating in /in/mYosf on line 15 95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7<br>
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: openssl_random_pseudo_bytes() in /in/mYosf on line 8
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Fatal error: Call to undefined function: openssl_random_pseudo_bytes() in /in/mYosf on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: openssl_random_pseudo_bytes() in /in/mYosf on line 8

preferences:
222.54 ms | 401 KiB | 308 Q