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