1 /* 2 +----------------------------------------------------------------------+ 3 | PHP Version 7 | 4 +----------------------------------------------------------------------+ 5 | Copyright (c) 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_MINIT_FUNCTION(sodium_password_hash); 33 PHP_MSHUTDOWN_FUNCTION(sodium); 34 PHP_RINIT_FUNCTION(sodium); 35 PHP_RSHUTDOWN_FUNCTION(sodium); 36 PHP_MINFO_FUNCTION(sodium); 37 38 PHP_FUNCTION(sodium_add); 39 PHP_FUNCTION(sodium_base642bin); 40 PHP_FUNCTION(sodium_bin2base64); 41 PHP_FUNCTION(sodium_bin2hex); 42 PHP_FUNCTION(sodium_compare); 43 PHP_FUNCTION(sodium_crypto_aead_aes256gcm_decrypt); 44 PHP_FUNCTION(sodium_crypto_aead_aes256gcm_encrypt); 45 PHP_FUNCTION(sodium_crypto_aead_aes256gcm_is_available); 46 PHP_FUNCTION(sodium_crypto_aead_aes256gcm_keygen); 47 PHP_FUNCTION(sodium_crypto_aead_chacha20poly1305_decrypt); 48 PHP_FUNCTION(sodium_crypto_aead_chacha20poly1305_encrypt); 49 PHP_FUNCTION(sodium_crypto_aead_chacha20poly1305_ietf_decrypt); 50 PHP_FUNCTION(sodium_crypto_aead_chacha20poly1305_ietf_encrypt); 51 PHP_FUNCTION(sodium_crypto_aead_chacha20poly1305_ietf_keygen); 52 PHP_FUNCTION(sodium_crypto_aead_chacha20poly1305_keygen); 53 PHP_FUNCTION(sodium_crypto_aead_xchacha20poly1305_ietf_decrypt); 54 PHP_FUNCTION(sodium_crypto_aead_xchacha20poly1305_ietf_encrypt); 55 PHP_FUNCTION(sodium_crypto_aead_xchacha20poly1305_ietf_keygen); 56 PHP_FUNCTION(sodium_crypto_auth); 57 PHP_FUNCTION(sodium_crypto_auth_keygen); 58 PHP_FUNCTION(sodium_crypto_auth_verify); 59 PHP_FUNCTION(sodium_crypto_box); 60 PHP_FUNCTION(sodium_crypto_box_keypair); 61 PHP_FUNCTION(sodium_crypto_box_keypair_from_secretkey_and_publickey); 62 PHP_FUNCTION(sodium_crypto_box_open); 63 PHP_FUNCTION(sodium_crypto_box_publickey); 64 PHP_FUNCTION(sodium_crypto_box_publickey_from_secretkey); 65 PHP_FUNCTION(sodium_crypto_box_seal); 66 PHP_FUNCTION(sodium_crypto_box_seal_open); 67 PHP_FUNCTION(sodium_crypto_box_secretkey); 68 PHP_FUNCTION(sodium_crypto_box_seed_keypair); 69 PHP_FUNCTION(sodium_crypto_generichash); 70 PHP_FUNCTION(sodium_crypto_generichash_final); 71 PHP_FUNCTION(sodium_crypto_generichash_init); 72 PHP_FUNCTION(sodium_crypto_generichash_keygen); 73 PHP_FUNCTION(sodium_crypto_generichash_update); 74 PHP_FUNCTION(sodium_crypto_kdf_derive_from_key); 75 PHP_FUNCTION(sodium_crypto_kdf_keygen); 76 PHP_FUNCTION(sodium_crypto_kx_client_session_keys); 77 PHP_FUNCTION(sodium_crypto_kx_keypair); 78 PHP_FUNCTION(sodium_crypto_kx_publickey); 79 PHP_FUNCTION(sodium_crypto_kx_secretkey); 80 PHP_FUNCTION(sodium_crypto_kx_seed_keypair); 81 PHP_FUNCTION(sodium_crypto_kx_server_session_keys); 82 PHP_FUNCTION(sodium_crypto_pwhash); 83 PHP_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256); 84 PHP_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256_str); 85 PHP_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256_str_verify); 86 PHP_FUNCTION(sodium_crypto_pwhash_str); 87 PHP_FUNCTION(sodium_crypto_pwhash_str_needs_rehash); 88 PHP_FUNCTION(sodium_crypto_pwhash_str_verify); 89 PHP_FUNCTION(sodium_crypto_scalarmult); 90 PHP_FUNCTION(sodium_crypto_scalarmult_base); 91 PHP_FUNCTION(sodium_crypto_secretbox); 92 PHP_FUNCTION(sodium_crypto_secretbox_keygen); 93 PHP_FUNCTION(sodium_crypto_secretbox_open); 94 PHP_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_keygen); 95 PHP_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_init_push); 96 PHP_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_push); 97 PHP_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_init_pull); 98 PHP_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_pull); 99 PHP_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_rekey); 100 PHP_FUNCTION(sodium_crypto_shorthash); 101 PHP_FUNCTION(sodium_crypto_shorthash_keygen); 102 PHP_FUNCTION(sodium_crypto_sign); 103 PHP_FUNCTION(sodium_crypto_sign_detached); 104 PHP_FUNCTION(sodium_crypto_sign_ed25519_pk_to_curve25519); 105 PHP_FUNCTION(sodium_crypto_sign_ed25519_sk_to_curve25519); 106 PHP_FUNCTION(sodium_crypto_sign_keypair); 107 PHP_FUNCTION(sodium_crypto_sign_keypair_from_secretkey_and_publickey); 108 PHP_FUNCTION(sodium_crypto_sign_open); 109 PHP_FUNCTION(sodium_crypto_sign_publickey); 110 PHP_FUNCTION(sodium_crypto_sign_publickey_from_secretkey); 111 PHP_FUNCTION(sodium_crypto_sign_secretkey); 112 PHP_FUNCTION(sodium_crypto_sign_seed_keypair); 113 PHP_FUNCTION(sodium_crypto_sign_verify_detached); 114 PHP_FUNCTION(sodium_crypto_stream); 115 PHP_FUNCTION(sodium_crypto_stream_keygen); 116 PHP_FUNCTION(sodium_crypto_stream_xor); 117 PHP_FUNCTION(sodium_hex2bin); 118 PHP_FUNCTION(sodium_increment); 119 PHP_FUNCTION(sodium_memcmp); 120 PHP_FUNCTION(sodium_memzero); 121 PHP_FUNCTION(sodium_pad); 122 PHP_FUNCTION(sodium_unpad); 123 124 #endif /* PHP_LIBSODIUM_H */ 125