Skip to content

Commit

Permalink
ext/sodium: the second parameter of sodium_hex2bin() is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Aug 29, 2017
1 parent b1a7885 commit 04c87ea
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ext/sodium/libsodium.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ ZEND_BEGIN_ARG_INFO_EX(AI_TwoStrings, 0, 0, 2)
ZEND_ARG_INFO(0, string_2)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(AI_StringAndMaybeString, 0, 0, 1)
ZEND_ARG_INFO(0, string_1)
/* optional */
ZEND_ARG_INFO(0, string_2)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(AI_StringRefAndString, 0, 0, 2)
ZEND_ARG_INFO(1, string_1)
ZEND_ARG_INFO(0, string_2)
Expand Down Expand Up @@ -264,7 +270,7 @@ const zend_function_entry sodium_functions[] = {
(SODIUM_LIBRARY_VERSION_MAJOR == 7 && SODIUM_LIBRARY_VERSION_MINOR >= 6)
PHP_FE(sodium_compare, AI_TwoStrings)
#endif
PHP_FE(sodium_hex2bin, AI_TwoStrings)
PHP_FE(sodium_hex2bin, AI_AI_StringAndMaybeString)
PHP_FE(sodium_increment, AI_StringRef)
PHP_FE(sodium_add, AI_StringRefAndString)
PHP_FE(sodium_memcmp, AI_TwoStrings)
Expand Down

0 comments on commit 04c87ea

Please sign in to comment.