php_libsodium.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Copyright (c) The PHP Group |
  4. +----------------------------------------------------------------------+
  5. | This source file is subject to version 3.01 of the PHP license, |
  6. | that is bundled with this package in the file LICENSE, and is |
  7. | available through the world-wide-web at the following url: |
  8. | https://www.php.net/license/3_01.txt |
  9. | If you did not receive a copy of the PHP license and are unable to |
  10. | obtain it through the world-wide-web, please send a note to |
  11. | license@php.net so we can mail you a copy immediately. |
  12. +----------------------------------------------------------------------+
  13. | Authors: Frank Denis <jedisct1@php.net> |
  14. +----------------------------------------------------------------------+
  15. */
  16. #ifndef PHP_LIBSODIUM_H
  17. #define PHP_LIBSODIUM_H
  18. extern zend_module_entry sodium_module_entry;
  19. #define phpext_sodium_ptr &sodium_module_entry
  20. #define PHP_SODIUM_VERSION PHP_VERSION
  21. #ifdef ZTS
  22. # include "TSRM.h"
  23. #endif
  24. PHP_MINIT_FUNCTION(sodium);
  25. PHP_MINIT_FUNCTION(sodium_password_hash);
  26. PHP_MSHUTDOWN_FUNCTION(sodium);
  27. PHP_RINIT_FUNCTION(sodium);
  28. PHP_RSHUTDOWN_FUNCTION(sodium);
  29. PHP_MINFO_FUNCTION(sodium);
  30. PHP_FUNCTION(sodium_add);
  31. PHP_FUNCTION(sodium_base642bin);
  32. PHP_FUNCTION(sodium_bin2base64);
  33. PHP_FUNCTION(sodium_bin2hex);
  34. PHP_FUNCTION(sodium_compare);
  35. PHP_FUNCTION(sodium_crypto_aead_aes256gcm_decrypt);
  36. PHP_FUNCTION(sodium_crypto_aead_aes256gcm_encrypt);
  37. PHP_FUNCTION(sodium_crypto_aead_aes256gcm_is_available);
  38. PHP_FUNCTION(sodium_crypto_aead_aes256gcm_keygen);
  39. PHP_FUNCTION(sodium_crypto_aead_chacha20poly1305_decrypt);
  40. PHP_FUNCTION(sodium_crypto_aead_chacha20poly1305_encrypt);
  41. PHP_FUNCTION(sodium_crypto_aead_chacha20poly1305_ietf_decrypt);
  42. PHP_FUNCTION(sodium_crypto_aead_chacha20poly1305_ietf_encrypt);
  43. PHP_FUNCTION(sodium_crypto_aead_chacha20poly1305_ietf_keygen);
  44. PHP_FUNCTION(sodium_crypto_aead_chacha20poly1305_keygen);
  45. PHP_FUNCTION(sodium_crypto_aead_xchacha20poly1305_ietf_decrypt);
  46. PHP_FUNCTION(sodium_crypto_aead_xchacha20poly1305_ietf_encrypt);
  47. PHP_FUNCTION(sodium_crypto_aead_xchacha20poly1305_ietf_keygen);
  48. PHP_FUNCTION(sodium_crypto_auth);
  49. PHP_FUNCTION(sodium_crypto_auth_keygen);
  50. PHP_FUNCTION(sodium_crypto_auth_verify);
  51. PHP_FUNCTION(sodium_crypto_box);
  52. PHP_FUNCTION(sodium_crypto_box_keypair);
  53. PHP_FUNCTION(sodium_crypto_box_keypair_from_secretkey_and_publickey);
  54. PHP_FUNCTION(sodium_crypto_box_open);
  55. PHP_FUNCTION(sodium_crypto_box_publickey);
  56. PHP_FUNCTION(sodium_crypto_box_publickey_from_secretkey);
  57. PHP_FUNCTION(sodium_crypto_box_seal);
  58. PHP_FUNCTION(sodium_crypto_box_seal_open);
  59. PHP_FUNCTION(sodium_crypto_box_secretkey);
  60. PHP_FUNCTION(sodium_crypto_box_seed_keypair);
  61. PHP_FUNCTION(sodium_crypto_core_ristretto255_add);
  62. PHP_FUNCTION(sodium_crypto_core_ristretto255_from_hash);
  63. PHP_FUNCTION(sodium_crypto_core_ristretto255_is_valid_point);
  64. PHP_FUNCTION(sodium_crypto_core_ristretto255_random);
  65. PHP_FUNCTION(sodium_crypto_core_ristretto255_scalar_add);
  66. PHP_FUNCTION(sodium_crypto_core_ristretto255_scalar_complement);
  67. PHP_FUNCTION(sodium_crypto_core_ristretto255_scalar_invert);
  68. PHP_FUNCTION(sodium_crypto_core_ristretto255_scalar_mul);
  69. PHP_FUNCTION(sodium_crypto_core_ristretto255_scalar_negate);
  70. PHP_FUNCTION(sodium_crypto_core_ristretto255_scalar_random);
  71. PHP_FUNCTION(sodium_crypto_core_ristretto255_scalar_reduce);
  72. PHP_FUNCTION(sodium_crypto_core_ristretto255_scalar_sub);
  73. PHP_FUNCTION(sodium_crypto_core_ristretto255_sub);
  74. PHP_FUNCTION(sodium_crypto_generichash);
  75. PHP_FUNCTION(sodium_crypto_generichash_final);
  76. PHP_FUNCTION(sodium_crypto_generichash_init);
  77. PHP_FUNCTION(sodium_crypto_generichash_keygen);
  78. PHP_FUNCTION(sodium_crypto_generichash_update);
  79. PHP_FUNCTION(sodium_crypto_kdf_derive_from_key);
  80. PHP_FUNCTION(sodium_crypto_kdf_keygen);
  81. PHP_FUNCTION(sodium_crypto_kx_client_session_keys);
  82. PHP_FUNCTION(sodium_crypto_kx_keypair);
  83. PHP_FUNCTION(sodium_crypto_kx_publickey);
  84. PHP_FUNCTION(sodium_crypto_kx_secretkey);
  85. PHP_FUNCTION(sodium_crypto_kx_seed_keypair);
  86. PHP_FUNCTION(sodium_crypto_kx_server_session_keys);
  87. PHP_FUNCTION(sodium_crypto_pwhash);
  88. PHP_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256);
  89. PHP_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256_str);
  90. PHP_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256_str_verify);
  91. PHP_FUNCTION(sodium_crypto_pwhash_str);
  92. PHP_FUNCTION(sodium_crypto_pwhash_str_needs_rehash);
  93. PHP_FUNCTION(sodium_crypto_pwhash_str_verify);
  94. PHP_FUNCTION(sodium_crypto_scalarmult);
  95. PHP_FUNCTION(sodium_crypto_scalarmult_base);
  96. PHP_FUNCTION(sodium_crypto_scalarmult_ristretto255);
  97. PHP_FUNCTION(sodium_crypto_scalarmult_ristretto255_base);
  98. PHP_FUNCTION(sodium_crypto_secretbox);
  99. PHP_FUNCTION(sodium_crypto_secretbox_keygen);
  100. PHP_FUNCTION(sodium_crypto_secretbox_open);
  101. PHP_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_keygen);
  102. PHP_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_init_push);
  103. PHP_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_push);
  104. PHP_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_init_pull);
  105. PHP_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_pull);
  106. PHP_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_rekey);
  107. PHP_FUNCTION(sodium_crypto_shorthash);
  108. PHP_FUNCTION(sodium_crypto_shorthash_keygen);
  109. PHP_FUNCTION(sodium_crypto_sign);
  110. PHP_FUNCTION(sodium_crypto_sign_detached);
  111. PHP_FUNCTION(sodium_crypto_sign_ed25519_pk_to_curve25519);
  112. PHP_FUNCTION(sodium_crypto_sign_ed25519_sk_to_curve25519);
  113. PHP_FUNCTION(sodium_crypto_sign_keypair);
  114. PHP_FUNCTION(sodium_crypto_sign_keypair_from_secretkey_and_publickey);
  115. PHP_FUNCTION(sodium_crypto_sign_open);
  116. PHP_FUNCTION(sodium_crypto_sign_publickey);
  117. PHP_FUNCTION(sodium_crypto_sign_publickey_from_secretkey);
  118. PHP_FUNCTION(sodium_crypto_sign_secretkey);
  119. PHP_FUNCTION(sodium_crypto_sign_seed_keypair);
  120. PHP_FUNCTION(sodium_crypto_sign_verify_detached);
  121. PHP_FUNCTION(sodium_crypto_stream);
  122. PHP_FUNCTION(sodium_crypto_stream_keygen);
  123. PHP_FUNCTION(sodium_crypto_stream_xor);
  124. PHP_FUNCTION(sodium_crypto_stream_xchacha20);
  125. PHP_FUNCTION(sodium_crypto_stream_xchacha20_keygen);
  126. PHP_FUNCTION(sodium_crypto_stream_xchacha20_xor);
  127. PHP_FUNCTION(sodium_hex2bin);
  128. PHP_FUNCTION(sodium_increment);
  129. PHP_FUNCTION(sodium_memcmp);
  130. PHP_FUNCTION(sodium_memzero);
  131. PHP_FUNCTION(sodium_pad);
  132. PHP_FUNCTION(sodium_unpad);
  133. #endif /* PHP_LIBSODIUM_H */