From 6b6201edd9c0bff89474efbecc212ab6c7ec3d7d Mon Sep 17 00:00:00 2001 From: Christoph Michael Becker Date: Thu, 12 Jan 2017 18:31:07 +0000 Subject: [PATCH] Added docs for parameters of openssl_encrypt and openssl_decrypt introduced in https://wiki.php.net/rfc/openssl_aead -- Provided by anonymous 77751 (me@jiripudil.cz) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@341653 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../openssl/functions/openssl-decrypt.xml | 22 +++++++++++++ .../openssl/functions/openssl-encrypt.xml | 31 +++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/reference/openssl/functions/openssl-decrypt.xml b/reference/openssl/functions/openssl-decrypt.xml index c90f6ca986..6b0784b4b1 100644 --- a/reference/openssl/functions/openssl-decrypt.xml +++ b/reference/openssl/functions/openssl-decrypt.xml @@ -16,6 +16,8 @@ stringpassword intoptions0 stringiv"" + stringtag"" + stringaad"" Takes a raw or base64 encoded string and decrypts it using a given method and key. @@ -71,6 +73,22 @@ + + tag + + + The authentication tag in AEAD cipher mode. If it is incorrect, the authentication fails and the function returns &false;. + + + + + aad + + + Additional authentication data. + + + @@ -117,6 +135,10 @@ The raw_output was changed to options. + + 7.1.0 + The tag and aad parameters were added. + diff --git a/reference/openssl/functions/openssl-encrypt.xml b/reference/openssl/functions/openssl-encrypt.xml index ebaba71df6..61e303b9b1 100644 --- a/reference/openssl/functions/openssl-encrypt.xml +++ b/reference/openssl/functions/openssl-encrypt.xml @@ -16,6 +16,9 @@ stringpassword intoptions0 stringiv"" + stringtagNULL + stringaad"" + inttag_length16 Encrypts given data with given method and key, returns a raw @@ -69,6 +72,30 @@ + + tag + + + The authentication tag passed by reference when using AEAD cipher mode (GCM or CCM). + + + + + aad + + + Additional authentication data. + + + + + tag_length + + + The length of the authentication tag. Its value can be between 4 and 16 for GCM mode. + + + @@ -115,6 +142,10 @@ The raw_output was changed to options. + + 7.1.0 + The tag, aad and tag_length parameters were added. +