Mercurial > hg > php_nacl
changeset 8:a1fc155ca80b
Fixed reference-output parameters in key generation functions
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Thu, 14 Jul 2011 16:32:23 +0200 |
parents | a139bed53614 |
children | 765303f4f2da |
files | nacl.c |
diffstat | 1 files changed, 25 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/nacl.c Tue Jul 12 21:26:46 2011 +0000 +++ b/nacl.c Thu Jul 14 16:32:23 2011 +0200 @@ -39,6 +39,29 @@ #include "randombytes.c" #endif +#if defined crypto_box_curve25519xsalsa20poly1305_KEYPAIRRANDOMBYTES +ZEND_BEGIN_ARG_INFO_EX(arginfo_nacl_crypto_box_curve25519xsalsa20poly1305_keypair, 0, 0, 2) + ZEND_ARG_INFO(1, zsk) + ZEND_ARG_INFO(0, rb) +ZEND_END_ARG_INFO() +#else +ZEND_BEGIN_ARG_INFO_EX(arginfo_nacl_crypto_box_curve25519xsalsa20poly1305_keypair, 0, 0, 1) + ZEND_ARG_INFO(1, zsk) + ZEND_ARG_INFO(0, rb) +ZEND_END_ARG_INFO() +#endif +#if defined crypto_sign_edwards25519sha512batch_KEYPAIRRANDOMBYTES +ZEND_BEGIN_ARG_INFO_EX(arginfo_nacl_crypto_sign_edwards25519sha512batch_keypair, 0, 0, 2) + ZEND_ARG_INFO(1, zsk) + ZEND_ARG_INFO(0, rb) +ZEND_END_ARG_INFO() +#else +ZEND_BEGIN_ARG_INFO_EX(arginfo_nacl_crypto_sign_edwards25519sha512batch_keypair, 0, 0, 1) + ZEND_ARG_INFO(1, zsk) + ZEND_ARG_INFO(0, rb) +ZEND_END_ARG_INFO() +#endif + static function_entry nacl_functions[] = { PHP_FE(nacl_crypto_box_curve25519xsalsa20poly1305, NULL) PHP_FE(nacl_crypto_box_curve25519xsalsa20poly1305_open, NULL) @@ -46,10 +69,10 @@ PHP_FE(nacl_crypto_box_curve25519xsalsa20poly1305_beforenm, NULL) PHP_FE(nacl_crypto_box_curve25519xsalsa20poly1305_afternm, NULL) PHP_FE(nacl_crypto_box_curve25519xsalsa20poly1305_open_afternm, NULL) - PHP_FE(nacl_crypto_box_curve25519xsalsa20poly1305_keypair, NULL) + PHP_FE(nacl_crypto_box_curve25519xsalsa20poly1305_keypair, arginfo_nacl_crypto_box_curve25519xsalsa20poly1305_keypair) PHP_FE(nacl_crypto_sign_edwards25519sha512batch, NULL) PHP_FE(nacl_crypto_sign_edwards25519sha512batch_open, NULL) - PHP_FE(nacl_crypto_sign_edwards25519sha512batch_keypair, NULL) + PHP_FE(nacl_crypto_sign_edwards25519sha512batch_keypair, arginfo_nacl_crypto_sign_edwards25519sha512batch_keypair) {NULL, NULL, NULL} };