Doc #80236 [NEW]: How $tag works in openssl_encrypt() with GCM mode is unclear
From: adrian at proresult dot no
Operating system: Any
PHP version: Irrelevant
Package: OpenSSL related
Bug Type: Documentation Problem
Bug description:How $tag works in openssl_encrypt() with GCM mode is unclear
Description:
------------
---
From manual page: https://php.net/function.openssl-encrypt
---
As the documentation stands today, I think it's unclear how $tag is set
and how you're supposed to retrieve/use it. After searching through
other online sources for a while, I figured out that $tag is
automatically set when calling openssl_encrypt(). Once I know, it seems
obvious (since it's passed by reference, the function can alter its
value), but before I was spoon-fed this information elsewhere, I had a
hard time understanding how $tag should be formed, how it is set, and
how it can be retrieved by the programmer. I suggest making this clearer
in the documentation to avoid future confusion for other developers new
to the openssl_* functions.
--
Edit bug report at https://bugs.php.net/bug.php?id=80236&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80236&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80236&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80236&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80236&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80236&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80236&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80236&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80236&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80236&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80236&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80236&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80236&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80236&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80236&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80236&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80236&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80236&r=mysqlcfg
Thread (3 messages)
- adrian at proresult dot no