<?php
$key = hash_pbkdf2(
'sha256',
'foot assay palsy levin sn tenney slap rap sepoy sturm fine hue knox han pawn erro',
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\1e\x1f",
86000,
32,
true
);
$iv = random_bytes(openssl_cipher_iv_length('aes-256-gcm'));
$data = 'Obscene artwork possibly from furaffinity.jpg';
$ciphertext = openssl_encrypt(
$data,
'aes-256-gcm',
$key,
OPENSSL_RAW_DATA,
$iv
);
$decrypted = openssl_decrypt(
$ciphertext,
'aes-256-gcm',
$key,
OPENSSL_RAW_DATA,
$iv
);
var_dump($ciphertext);
var_dump($decrypted);
- Output for 7.1.5 - 7.1.7
- Warning: openssl_encrypt(): A tag should be provided when using AEAD mode in /in/9TNTp on line 20
bool(false)
bool(false)
- Output for 7.1.0
- Warning: openssl_encrypt(): A tag should be provided when using AEAD mode in /in/9TNTp on line 19
bool(false)
bool(false)
- Output for 7.0.20
- string(45) "_���X��q���-�FS5�O3ɫm.\�c�tU(����"
bool(false)
- Output for 7.0.6
- string(45) "� ��@�3M;����ٮQ��V�F� �#�cw �u;8i�"
bool(false)
- Output for 7.0.5
- string(45) ".�@ÎCS2ʂ�`���#�:O�'ͽ��ZoL����cr�D;*��"
bool(false)
- Output for 7.0.4
- string(45) "4��R�vY:k.�
�)���&��뮄Ȩ�s8�C�ݹ2�M���"
bool(false)
- Output for 7.0.3
- string(45) "��1AYJ��mz'Fx�ݚe�ULe�8e�ێo퐨��K�`�"
bool(false)
- Output for 7.0.2
- string(45) "'z����Q���
Fl��,���0�̭�������<��&\�:�"
bool(false)
- Output for 7.0.1
- string(45) "���$�/q-vm'|���1&>k1)E�`��4��<�え���"
bool(false)
- Output for 7.0.0
- string(45) "�R%$r��M��Z_�Y�⪌��f�Q���3��H���]�a�"
bool(false)
- Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
- Fatal error: Call to undefined function random_bytes() in /in/9TNTp on line 11
Process exited with code 255.
preferences:
72.49 ms | 402 KiB | 44 Q