1 /* 2 +----------------------------------------------------------------------+ 3 | PHP Version 5 | 4 +----------------------------------------------------------------------+ 5 | Copyright (c) 2013-2016 Jakub Zelenka | 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 | Author: Jakub Zelenka <bukka@php.net> | 16 +----------------------------------------------------------------------+ 17 */ 18 19 #ifndef PHP_CRYPTO_STREAM_H 20 #define PHP_CRYPTO_STREAM_H 21 22 #include "php_crypto.h" 23 24 #define PHP_CRYPTO_STREAM_SCHEME_PREFIX "://" 25 26 /* general wrapper name for selecting context options s*/ 27 #define PHP_CRYPTO_STREAM_WRAPPER_NAME "crypto" 28 29 /* file stream */ 30 #define PHP_CRYPTO_STREAM_FILE_WRAPPER_NAME "crypto.file" 31 #define PHP_CRYPTO_STREAM_FILE_SCHEME \ 32 PHP_CRYPTO_STREAM_FILE_WRAPPER_NAME PHP_CRYPTO_STREAM_SCHEME_PREFIX 33 #define PHP_CRYPTO_STREAM_FILE_SCHEME_SIZE sizeof(PHP_CRYPTO_STREAM_FILE_SCHEME) - 1 34 35 /* stream meta headers for cipher authentication */ 36 #define PHP_CRYPTO_STREAM_META_AUTH_TAG "X-PHP-Crypto-Auth-Tag" 37 #define PHP_CRYPTO_STREAM_META_AUTH_RESULT "X-PHP-Crypto-Auth-Result" 38 39 /* Error info */ 40 PHP_CRYPTO_ERROR_INFO_EXPORT(Stream) 41 42 /* Stream error action */ 43 #define PHP_CRYPTO_STREAM_ERROR_ACTION PHP_CRYPTO_ERROR_ACTION_ERROR 44 45 /* Stream error args macro */ 46 #define PHP_CRYPTO_STREAM_ERROR_ARGS(einame) \ 47 PHP_CRYPTO_ERROR_ARGS_EX(Stream, NULL, PHP_CRYPTO_STREAM_ERROR_ACTION, einame) 48 49 /* Module init and shut down callbacks */ 50 PHP_MINIT_FUNCTION(crypto_stream); 51 PHP_MSHUTDOWN_FUNCTION(crypto_stream); 52 53 #endif /* PHP_CRYPTO_STREAM_H */ 54 55