小编Joe*_*zar的帖子

openssl_decrypt tag value

I'm using the openssl_encrypt / decrypt method in my website but i'm having some troubles with the $tag option

openssl_encrypt ( $data, $method, $key, $options, $iv, $tag )
openssl_decrypt ( $data, $method, $key, $options, $iv, $tag )
Run Code Online (Sandbox Code Playgroud)

from http://php.net/manual/en/function.openssl-encrypt.php, the definition of tag is: The authentication tag passed by reference when using AEAD cipher mode (GCM or CCM). But i didn't understand it.

I tried it in my codes

$data = "text to be encrypted";
$cipher = "aes-128-gcm";
$key …
Run Code Online (Sandbox Code Playgroud)

php encryption openssl

5
推荐指数
1
解决办法
5871
查看次数

标签 统计

encryption ×1

openssl ×1

php ×1