|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #78748 Undefined sodium_crypto_secretbox_keygen function
Submitted: 2019-10-24 14:01 UTC Modified: 2019-11-03 04:22 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: danitot93 at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: *Encryption and hash functions
PHP Version: 7.2.24 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
7 - 5 = ?
Subscribe to this entry?

 [2019-10-24 14:01 UTC] danitot93 at gmail dot com

(PHP 7 >= 7.2.0) - so sodium_crypto_secretbox_keygen function must be defined in php 7.2.24

other sodium_* functions work fine.

I don't know is this Bug or Documentation Problem.

Test script:

$key = sodium_crypto_secretbox_keygen();

echo $key;

Expected result:
No errors.

Actual result:
Fatal error: Uncaught Error: Call to undefined function sodium_crypto_secretbox_keygen()


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-10-24 15:01 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2019-10-24 15:01 UTC]
Are you using a distro?  Does this distro actually ship
PECL/sodium instead of ext/sodium?  If so, which version of
 [2019-11-03 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Dec 04 01:03:48 2022 UTC