<?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);
preferences:
31.57 ms | 402 KiB | 5 Q