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