diff options
-rw-r--r-- | 0001-Fix-Wincompatible-pointer-types.patch | 50 | ||||
-rw-r--r-- | 0001-fix-for-PHP-8.4.patch | 64 | ||||
-rw-r--r-- | PHPINFO | 7 | ||||
-rw-r--r-- | REFLECTION | 748 | ||||
-rw-r--r-- | php-pecl-crypto.spec | 187 |
5 files changed, 761 insertions, 295 deletions
diff --git a/0001-Fix-Wincompatible-pointer-types.patch b/0001-Fix-Wincompatible-pointer-types.patch new file mode 100644 index 0000000..2c2fa40 --- /dev/null +++ b/0001-Fix-Wincompatible-pointer-types.patch @@ -0,0 +1,50 @@ +From 3b841b78f00acbd8bef95d8ebcd0fefe9a0f0bfa Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Fri, 16 Feb 2024 15:58:45 +0100 +Subject: [PATCH] Fix [-Wincompatible-pointer-types] + +--- + crypto_stream.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/crypto_stream.c b/crypto_stream.c +index 4e0758c..f208b34 100644 +--- a/crypto_stream.c ++++ b/crypto_stream.c +@@ -133,13 +133,21 @@ typedef struct { + } php_crypto_stream_data; + + /* {{{ php_crypto_stream_write */ ++#if PHP_VERSION_ID < 70400 + static size_t php_crypto_stream_write(php_stream *stream, ++#else ++static ssize_t php_crypto_stream_write(php_stream *stream, ++#endif + const char *buf, size_t count TSRMLS_DC) + { + php_crypto_stream_data *data = (php_crypto_stream_data *) stream->abstract; + int bytes_written = BIO_write(data->bio, buf, count > INT_MAX ? INT_MAX : count); + ++#if PHP_VERSION_ID < 70400 + return bytes_written <= 0 ? 0 : (size_t) bytes_written; ++#else ++ return bytes_written; ++#endif + } + /* }}} */ + +@@ -256,7 +264,11 @@ static void php_crypto_stream_auth_save_result(php_stream *stream, int ok) + /* }}} */ + + /* {{{ php_crypto_stream_read */ ++#if PHP_VERSION_ID < 70400 + static size_t php_crypto_stream_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) ++#else ++static ssize_t php_crypto_stream_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) ++#endif + { + php_crypto_stream_data *data = (php_crypto_stream_data *) stream->abstract; + int bytes_read = BIO_read(data->bio, buf, count > INT_MAX ? INT_MAX : count); +-- +2.43.0 + diff --git a/0001-fix-for-PHP-8.4.patch b/0001-fix-for-PHP-8.4.patch new file mode 100644 index 0000000..89eb499 --- /dev/null +++ b/0001-fix-for-PHP-8.4.patch @@ -0,0 +1,64 @@ +From 6137150915431a59edb993a008eb3b21fc2d02e0 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Wed, 25 Sep 2024 15:06:03 +0200 +Subject: [PATCH] fix for PHP 8.4 + +--- + crypto_cipher.c | 12 ++++++++++++ + crypto_hash.c | 4 ++++ + 2 files changed, 16 insertions(+) + +diff --git a/crypto_cipher.c b/crypto_cipher.c +index a0465c1..fb3e410 100644 +--- a/crypto_cipher.c ++++ b/crypto_cipher.c +@@ -497,7 +497,11 @@ PHP_MINIT_FUNCTION(crypto_cipher) + static inline void php_crypto_cipher_set_algorithm_name(zval *object, + char *algorithm, phpc_str_size_t algorithm_len TSRMLS_DC) + { ++#if PHP_VERSION_ID < 80400 + php_strtoupper(algorithm, algorithm_len); ++#else ++ zend_str_toupper(algorithm, algorithm_len); ++#endif + zend_update_property_stringl(php_crypto_cipher_ce, PHPC_OBJ_FOR_PROP(object), + "algorithm", sizeof("algorithm")-1, algorithm, algorithm_len TSRMLS_CC); + } +@@ -513,10 +517,18 @@ PHP_CRYPTO_API const EVP_CIPHER *php_crypto_get_cipher_algorithm( + return NULL; + } + ++#if PHP_VERSION_ID < 80400 + php_strtoupper(algorithm, algorithm_len); ++#else ++ zend_str_toupper(algorithm, algorithm_len); ++#endif + cipher = EVP_get_cipherbyname(algorithm); + if (!cipher) { ++#if PHP_VERSION_ID < 80400 + php_strtolower(algorithm, algorithm_len); ++#else ++ zend_str_tolower(algorithm, algorithm_len); ++#endif + cipher = EVP_get_cipherbyname(algorithm); + } + return cipher; +diff --git a/crypto_hash.c b/crypto_hash.c +index 8015aa4..9c4f182 100644 +--- a/crypto_hash.c ++++ b/crypto_hash.c +@@ -319,7 +319,11 @@ PHP_MINIT_FUNCTION(crypto_hash) + static inline void php_crypto_hash_set_algorithm_name(zval *object, + char *algorithm, phpc_str_size_t algorithm_len TSRMLS_DC) + { ++#if PHP_VERSION_ID < 80400 + php_strtoupper(algorithm, algorithm_len); ++#else ++ zend_str_toupper(algorithm, algorithm_len); ++#endif + zend_update_property_stringl(php_crypto_hash_ce, PHPC_OBJ_FOR_PROP(object), + "algorithm", sizeof("algorithm")-1, algorithm, algorithm_len TSRMLS_CC); + } +-- +2.46.1 + @@ -0,0 +1,7 @@ + +crypto + +Crypto Support => enabled +Crypto Version => 0.3.2 +OpenSSL Library Version => OpenSSL 3.0.9 30 May 2023 +OpenSSL Header Version => OpenSSL 3.0.5 5 Jul 2022 @@ -1,7 +1,7 @@ -Extension [ <persistent> extension #78 crypto version 0.3.1 ] { +Extension [ <persistent> extension #125 crypto version 0.3.2 ] { - Classes [17] { - Class [ <internal:crypto> class Crypto\CryptoException extends Exception implements Throwable ] { + Class [ <internal:crypto> class Crypto\CryptoException extends Exception implements Throwable, Stringable ] { - Constants [0] { } @@ -13,84 +13,119 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } - Properties [4] { - Property [ <default> protected $message ] - Property [ <default> protected $code ] - Property [ <default> protected $file ] - Property [ <default> protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { Method [ <internal:Core, inherits Exception, ctor> public method __construct ] { - Parameters [3] { - Parameter #0 [ <optional> $message ] - Parameter #1 [ <optional> $code ] - Parameter #2 [ <optional> $previous ] + Parameter #0 [ <optional> string $message = "" ] + Parameter #1 [ <optional> int $code = 0 ] + Parameter #2 [ <optional> ?Throwable $previous = null ] } } Method [ <internal:Core, inherits Exception> public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] { + + - Parameters [0] { + } } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception, prototype Throwable> public method __toString ] { + Method [ <internal:Core, inherits Exception, prototype Stringable> public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } - Class [ <internal:crypto> class Crypto\CipherException extends Crypto\CryptoException implements Throwable ] { + Class [ <internal:crypto> class Crypto\CipherException extends Crypto\CryptoException implements Stringable, Throwable ] { - Constants [30] { - Constant [ integer ALGORITHM_NOT_FOUND ] { 1 } - Constant [ integer STATIC_METHOD_NOT_FOUND ] { 2 } - Constant [ integer STATIC_METHOD_TOO_MANY_ARGS ] { 3 } - Constant [ integer MODE_NOT_FOUND ] { 4 } - Constant [ integer MODE_NOT_AVAILABLE ] { 5 } - Constant [ integer AUTHENTICATION_NOT_SUPPORTED ] { 6 } - Constant [ integer KEY_LENGTH_INVALID ] { 7 } - Constant [ integer IV_LENGTH_INVALID ] { 8 } - Constant [ integer AAD_SETTER_FORBIDDEN ] { 9 } - Constant [ integer AAD_SETTER_FAILED ] { 10 } - Constant [ integer AAD_LENGTH_HIGH ] { 11 } - Constant [ integer TAG_GETTER_FORBIDDEN ] { 12 } - Constant [ integer TAG_SETTER_FORBIDDEN ] { 13 } - Constant [ integer TAG_GETTER_FAILED ] { 14 } - Constant [ integer TAG_SETTER_FAILED ] { 15 } - Constant [ integer TAG_LENGTH_SETTER_FORBIDDEN ] { 16 } - Constant [ integer TAG_LENGTH_LOW ] { 17 } - Constant [ integer TAG_LENGTH_HIGH ] { 18 } - Constant [ integer TAG_VERIFY_FAILED ] { 19 } - Constant [ integer INIT_ALG_FAILED ] { 20 } - Constant [ integer INIT_CTX_FAILED ] { 21 } - Constant [ integer INIT_ENCRYPT_FORBIDDEN ] { 22 } - Constant [ integer INIT_DECRYPT_FORBIDDEN ] { 23 } - Constant [ integer UPDATE_FAILED ] { 24 } - Constant [ integer UPDATE_ENCRYPT_FORBIDDEN ] { 25 } - Constant [ integer UPDATE_DECRYPT_FORBIDDEN ] { 26 } - Constant [ integer FINISH_FAILED ] { 27 } - Constant [ integer FINISH_ENCRYPT_FORBIDDEN ] { 28 } - Constant [ integer FINISH_DECRYPT_FORBIDDEN ] { 29 } - Constant [ integer INPUT_DATA_LENGTH_HIGH ] { 30 } + Constant [ public int ALGORITHM_NOT_FOUND ] { 1 } + Constant [ public int STATIC_METHOD_NOT_FOUND ] { 2 } + Constant [ public int STATIC_METHOD_TOO_MANY_ARGS ] { 3 } + Constant [ public int MODE_NOT_FOUND ] { 4 } + Constant [ public int MODE_NOT_AVAILABLE ] { 5 } + Constant [ public int AUTHENTICATION_NOT_SUPPORTED ] { 6 } + Constant [ public int KEY_LENGTH_INVALID ] { 7 } + Constant [ public int IV_LENGTH_INVALID ] { 8 } + Constant [ public int AAD_SETTER_FORBIDDEN ] { 9 } + Constant [ public int AAD_SETTER_FAILED ] { 10 } + Constant [ public int AAD_LENGTH_HIGH ] { 11 } + Constant [ public int TAG_GETTER_FORBIDDEN ] { 12 } + Constant [ public int TAG_SETTER_FORBIDDEN ] { 13 } + Constant [ public int TAG_GETTER_FAILED ] { 14 } + Constant [ public int TAG_SETTER_FAILED ] { 15 } + Constant [ public int TAG_LENGTH_SETTER_FORBIDDEN ] { 16 } + Constant [ public int TAG_LENGTH_LOW ] { 17 } + Constant [ public int TAG_LENGTH_HIGH ] { 18 } + Constant [ public int TAG_VERIFY_FAILED ] { 19 } + Constant [ public int INIT_ALG_FAILED ] { 20 } + Constant [ public int INIT_CTX_FAILED ] { 21 } + Constant [ public int INIT_ENCRYPT_FORBIDDEN ] { 22 } + Constant [ public int INIT_DECRYPT_FORBIDDEN ] { 23 } + Constant [ public int UPDATE_FAILED ] { 24 } + Constant [ public int UPDATE_ENCRYPT_FORBIDDEN ] { 25 } + Constant [ public int UPDATE_DECRYPT_FORBIDDEN ] { 26 } + Constant [ public int FINISH_FAILED ] { 27 } + Constant [ public int FINISH_ENCRYPT_FORBIDDEN ] { 28 } + Constant [ public int FINISH_DECRYPT_FORBIDDEN ] { 29 } + Constant [ public int INPUT_DATA_LENGTH_HIGH ] { 30 } } - Static properties [0] { @@ -100,47 +135,82 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } - Properties [4] { - Property [ <default> protected $message ] - Property [ <default> protected $code ] - Property [ <default> protected $file ] - Property [ <default> protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { Method [ <internal:Core, inherits Exception, ctor> public method __construct ] { - Parameters [3] { - Parameter #0 [ <optional> $message ] - Parameter #1 [ <optional> $code ] - Parameter #2 [ <optional> $previous ] + Parameter #0 [ <optional> string $message = "" ] + Parameter #1 [ <optional> int $code = 0 ] + Parameter #2 [ <optional> ?Throwable $previous = null ] } } Method [ <internal:Core, inherits Exception> public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] { + + - Parameters [0] { + } } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception, prototype Throwable> public method __toString ] { + Method [ <internal:Core, inherits Exception, prototype Stringable> public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } @@ -148,14 +218,14 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { Class [ <internal:crypto> class Crypto\Cipher ] { - Constants [8] { - Constant [ integer MODE_ECB ] { 1 } - Constant [ integer MODE_CBC ] { 2 } - Constant [ integer MODE_CFB ] { 3 } - Constant [ integer MODE_OFB ] { 4 } - Constant [ integer MODE_CTR ] { 5 } - Constant [ integer MODE_GCM ] { 6 } - Constant [ integer MODE_CCM ] { 7 } - Constant [ integer MODE_XTS ] { 65537 } + Constant [ public int MODE_ECB ] { 1 } + Constant [ public int MODE_CBC ] { 2 } + Constant [ public int MODE_CFB ] { 3 } + Constant [ public int MODE_OFB ] { 4 } + Constant [ public int MODE_CTR ] { 5 } + Constant [ public int MODE_GCM ] { 6 } + Constant [ public int MODE_CCM ] { 7 } + Constant [ public int MODE_XTS ] { 65537 } } - Static properties [0] { @@ -165,8 +235,8 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { Method [ <internal:crypto> static public method getAlgorithms ] { - Parameters [2] { - Parameter #0 [ <optional> $aliases ] - Parameter #1 [ <optional> $prefix ] + Parameter #0 [ <optional> $aliases = <default> ] + Parameter #1 [ <optional> $prefix = <default> ] } } @@ -194,7 +264,7 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } - Properties [1] { - Property [ <default> protected $algorithm ] + Property [ protected $algorithm = NULL ] } - Methods [18] { @@ -202,19 +272,22 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { - Parameters [3] { Parameter #0 [ <required> $algorithm ] - Parameter #1 [ <optional> $mode ] - Parameter #2 [ <optional> $key_size ] + Parameter #1 [ <optional> $mode = <default> ] + Parameter #2 [ <optional> $key_size = <default> ] } } Method [ <internal:crypto> public method getAlgorithmName ] { + + - Parameters [0] { + } } Method [ <internal:crypto> public method encryptInit ] { - Parameters [2] { Parameter #0 [ <required> $key ] - Parameter #1 [ <optional> $iv ] + Parameter #1 [ <optional> $iv = <default> ] } } @@ -226,6 +299,9 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } Method [ <internal:crypto> public method encryptFinish ] { + + - Parameters [0] { + } } Method [ <internal:crypto> public method encrypt ] { @@ -233,7 +309,7 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { - Parameters [3] { Parameter #0 [ <required> $data ] Parameter #1 [ <required> $key ] - Parameter #2 [ <optional> $iv ] + Parameter #2 [ <optional> $iv = <default> ] } } @@ -241,7 +317,7 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { - Parameters [2] { Parameter #0 [ <required> $key ] - Parameter #1 [ <optional> $iv ] + Parameter #1 [ <optional> $iv = <default> ] } } @@ -253,6 +329,9 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } Method [ <internal:crypto> public method decryptFinish ] { + + - Parameters [0] { + } } Method [ <internal:crypto> public method decrypt ] { @@ -260,23 +339,38 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { - Parameters [3] { Parameter #0 [ <required> $data ] Parameter #1 [ <required> $key ] - Parameter #2 [ <optional> $iv ] + Parameter #2 [ <optional> $iv = <default> ] } } Method [ <internal:crypto> public method getBlockSize ] { + + - Parameters [0] { + } } Method [ <internal:crypto> public method getKeyLength ] { + + - Parameters [0] { + } } Method [ <internal:crypto> public method getIVLength ] { + + - Parameters [0] { + } } Method [ <internal:crypto> public method getMode ] { + + - Parameters [0] { + } } Method [ <internal:crypto> public method getTag ] { + + - Parameters [0] { + } } Method [ <internal:crypto> public method setTag ] { @@ -314,8 +408,8 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { Method [ <internal:crypto> static public method getAlgorithms ] { - Parameters [2] { - Parameter #0 [ <optional> $aliases ] - Parameter #1 [ <optional> $prefix ] + Parameter #0 [ <optional> $aliases = <default> ] + Parameter #1 [ <optional> $prefix = <default> ] } } @@ -336,7 +430,7 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } - Properties [1] { - Property [ <default> protected $algorithm ] + Property [ protected $algorithm = NULL ] } - Methods [7] { @@ -355,32 +449,47 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } Method [ <internal:crypto> public method getAlgorithmName ] { + + - Parameters [0] { + } } Method [ <internal:crypto> public method digest ] { + + - Parameters [0] { + } } Method [ <internal:crypto> public method hexdigest ] { + + - Parameters [0] { + } } Method [ <internal:crypto> public method getSize ] { + + - Parameters [0] { + } } Method [ <internal:crypto> public method getBlockSize ] { + + - Parameters [0] { + } } } } - Class [ <internal:crypto> class Crypto\HashException extends Crypto\CryptoException implements Throwable ] { + Class [ <internal:crypto> class Crypto\HashException extends Crypto\CryptoException implements Stringable, Throwable ] { - Constants [7] { - Constant [ integer HASH_ALGORITHM_NOT_FOUND ] { 1 } - Constant [ integer STATIC_METHOD_NOT_FOUND ] { 2 } - Constant [ integer STATIC_METHOD_TOO_MANY_ARGS ] { 3 } - Constant [ integer INIT_FAILED ] { 4 } - Constant [ integer UPDATE_FAILED ] { 5 } - Constant [ integer DIGEST_FAILED ] { 6 } - Constant [ integer INPUT_DATA_LENGTH_HIGH ] { 7 } + Constant [ public int HASH_ALGORITHM_NOT_FOUND ] { 1 } + Constant [ public int STATIC_METHOD_NOT_FOUND ] { 2 } + Constant [ public int STATIC_METHOD_TOO_MANY_ARGS ] { 3 } + Constant [ public int INIT_FAILED ] { 4 } + Constant [ public int UPDATE_FAILED ] { 5 } + Constant [ public int DIGEST_FAILED ] { 6 } + Constant [ public int INPUT_DATA_LENGTH_HIGH ] { 7 } } - Static properties [0] { @@ -390,47 +499,82 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } - Properties [4] { - Property [ <default> protected $message ] - Property [ <default> protected $code ] - Property [ <default> protected $file ] - Property [ <default> protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { Method [ <internal:Core, inherits Exception, ctor> public method __construct ] { - Parameters [3] { - Parameter #0 [ <optional> $message ] - Parameter #1 [ <optional> $code ] - Parameter #2 [ <optional> $previous ] + Parameter #0 [ <optional> string $message = "" ] + Parameter #1 [ <optional> int $code = 0 ] + Parameter #2 [ <optional> ?Throwable $previous = null ] } } Method [ <internal:Core, inherits Exception> public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] { + + - Parameters [0] { + } } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception, prototype Throwable> public method __toString ] { + Method [ <internal:Core, inherits Exception, prototype Stringable> public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } @@ -447,8 +591,8 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { Method [ <internal:crypto, inherits Crypto\Hash> static public method getAlgorithms ] { - Parameters [2] { - Parameter #0 [ <optional> $aliases ] - Parameter #1 [ <optional> $prefix ] + Parameter #0 [ <optional> $aliases = <default> ] + Parameter #1 [ <optional> $prefix = <default> ] } } @@ -469,7 +613,7 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } - Properties [1] { - Property [ <default> protected $algorithm ] + Property [ protected $algorithm = NULL ] } - Methods [7] { @@ -489,34 +633,49 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } Method [ <internal:crypto, inherits Crypto\Hash> public method getAlgorithmName ] { + + - Parameters [0] { + } } Method [ <internal:crypto, inherits Crypto\Hash> public method digest ] { + + - Parameters [0] { + } } Method [ <internal:crypto, inherits Crypto\Hash> public method hexdigest ] { + + - Parameters [0] { + } } Method [ <internal:crypto, inherits Crypto\Hash> public method getSize ] { + + - Parameters [0] { + } } Method [ <internal:crypto, inherits Crypto\Hash> public method getBlockSize ] { + + - Parameters [0] { + } } } } - Class [ <internal:crypto> class Crypto\MACException extends Crypto\HashException implements Throwable ] { + Class [ <internal:crypto> class Crypto\MACException extends Crypto\HashException implements Throwable, Stringable ] { - Constants [9] { - Constant [ integer HASH_ALGORITHM_NOT_FOUND ] { 1 } - Constant [ integer STATIC_METHOD_NOT_FOUND ] { 2 } - Constant [ integer STATIC_METHOD_TOO_MANY_ARGS ] { 3 } - Constant [ integer INIT_FAILED ] { 4 } - Constant [ integer UPDATE_FAILED ] { 5 } - Constant [ integer DIGEST_FAILED ] { 6 } - Constant [ integer INPUT_DATA_LENGTH_HIGH ] { 7 } - Constant [ integer MAC_ALGORITHM_NOT_FOUND ] { 1 } - Constant [ integer KEY_LENGTH_INVALID ] { 2 } + Constant [ public int HASH_ALGORITHM_NOT_FOUND ] { 1 } + Constant [ public int STATIC_METHOD_NOT_FOUND ] { 2 } + Constant [ public int STATIC_METHOD_TOO_MANY_ARGS ] { 3 } + Constant [ public int INIT_FAILED ] { 4 } + Constant [ public int UPDATE_FAILED ] { 5 } + Constant [ public int DIGEST_FAILED ] { 6 } + Constant [ public int INPUT_DATA_LENGTH_HIGH ] { 7 } + Constant [ public int MAC_ALGORITHM_NOT_FOUND ] { 1 } + Constant [ public int KEY_LENGTH_INVALID ] { 2 } } - Static properties [0] { @@ -526,47 +685,82 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } - Properties [4] { - Property [ <default> protected $message ] - Property [ <default> protected $code ] - Property [ <default> protected $file ] - Property [ <default> protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { Method [ <internal:Core, inherits Exception, ctor> public method __construct ] { - Parameters [3] { - Parameter #0 [ <optional> $message ] - Parameter #1 [ <optional> $code ] - Parameter #2 [ <optional> $previous ] + Parameter #0 [ <optional> string $message = "" ] + Parameter #1 [ <optional> int $code = 0 ] + Parameter #2 [ <optional> ?Throwable $previous = null ] } } Method [ <internal:Core, inherits Exception> public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] { + + - Parameters [0] { + } } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception, prototype Throwable> public method __toString ] { + Method [ <internal:Core, inherits Exception, prototype Stringable> public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } @@ -583,8 +777,8 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { Method [ <internal:crypto, inherits Crypto\Hash> static public method getAlgorithms ] { - Parameters [2] { - Parameter #0 [ <optional> $aliases ] - Parameter #1 [ <optional> $prefix ] + Parameter #0 [ <optional> $aliases = <default> ] + Parameter #1 [ <optional> $prefix = <default> ] } } @@ -605,7 +799,7 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } - Properties [1] { - Property [ <default> protected $algorithm ] + Property [ protected $algorithm = NULL ] } - Methods [7] { @@ -625,18 +819,33 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } Method [ <internal:crypto, inherits Crypto\Hash> public method getAlgorithmName ] { + + - Parameters [0] { + } } Method [ <internal:crypto, inherits Crypto\Hash> public method digest ] { + + - Parameters [0] { + } } Method [ <internal:crypto, inherits Crypto\Hash> public method hexdigest ] { + + - Parameters [0] { + } } Method [ <internal:crypto, inherits Crypto\Hash> public method getSize ] { + + - Parameters [0] { + } } Method [ <internal:crypto, inherits Crypto\Hash> public method getBlockSize ] { + + - Parameters [0] { + } } } } @@ -653,8 +862,8 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { Method [ <internal:crypto, inherits Crypto\Hash> static public method getAlgorithms ] { - Parameters [2] { - Parameter #0 [ <optional> $aliases ] - Parameter #1 [ <optional> $prefix ] + Parameter #0 [ <optional> $aliases = <default> ] + Parameter #1 [ <optional> $prefix = <default> ] } } @@ -675,7 +884,7 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } - Properties [1] { - Property [ <default> protected $algorithm ] + Property [ protected $algorithm = NULL ] } - Methods [7] { @@ -695,18 +904,33 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } Method [ <internal:crypto, inherits Crypto\Hash> public method getAlgorithmName ] { + + - Parameters [0] { + } } Method [ <internal:crypto, inherits Crypto\Hash> public method digest ] { + + - Parameters [0] { + } } Method [ <internal:crypto, inherits Crypto\Hash> public method hexdigest ] { + + - Parameters [0] { + } } Method [ <internal:crypto, inherits Crypto\Hash> public method getSize ] { + + - Parameters [0] { + } } Method [ <internal:crypto, inherits Crypto\Hash> public method getBlockSize ] { + + - Parameters [0] { + } } } } @@ -740,6 +964,9 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { - Methods [5] { Method [ <internal:crypto, ctor> public method __construct ] { + + - Parameters [0] { + } } Method [ <internal:crypto> public method encodeUpdate ] { @@ -750,6 +977,9 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } Method [ <internal:crypto> public method encodeFinish ] { + + - Parameters [0] { + } } Method [ <internal:crypto> public method decodeUpdate ] { @@ -760,19 +990,22 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } Method [ <internal:crypto> public method decodeFinish ] { + + - Parameters [0] { + } } } } - Class [ <internal:crypto> class Crypto\Base64Exception extends Crypto\CryptoException implements Throwable ] { + Class [ <internal:crypto> class Crypto\Base64Exception extends Crypto\CryptoException implements Stringable, Throwable ] { - Constants [6] { - Constant [ integer ENCODE_UPDATE_FORBIDDEN ] { 1 } - Constant [ integer ENCODE_FINISH_FORBIDDEN ] { 2 } - Constant [ integer DECODE_UPDATE_FORBIDDEN ] { 3 } - Constant [ integer DECODE_FINISH_FORBIDDEN ] { 4 } - Constant [ integer DECODE_UPDATE_FAILED ] { 5 } - Constant [ integer INPUT_DATA_LENGTH_HIGH ] { 6 } + Constant [ public int ENCODE_UPDATE_FORBIDDEN ] { 1 } + Constant [ public int ENCODE_FINISH_FORBIDDEN ] { 2 } + Constant [ public int DECODE_UPDATE_FORBIDDEN ] { 3 } + Constant [ public int DECODE_FINISH_FORBIDDEN ] { 4 } + Constant [ public int DECODE_UPDATE_FAILED ] { 5 } + Constant [ public int INPUT_DATA_LENGTH_HIGH ] { 6 } } - Static properties [0] { @@ -782,47 +1015,82 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } - Properties [4] { - Property [ <default> protected $message ] - Property [ <default> protected $code ] - Property [ <default> protected $file ] - Property [ <default> protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { Method [ <internal:Core, inherits Exception, ctor> public method __construct ] { - Parameters [3] { - Parameter #0 [ <optional> $message ] - Parameter #1 [ <optional> $code ] - Parameter #2 [ <optional> $previous ] + Parameter #0 [ <optional> string $message = "" ] + Parameter #1 [ <optional> int $code = 0 ] + Parameter #2 [ <optional> ?Throwable $previous = null ] } } Method [ <internal:Core, inherits Exception> public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] { + + - Parameters [0] { + } } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception, prototype Throwable> public method __toString ] { + Method [ <internal:Core, inherits Exception, prototype Stringable> public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } @@ -840,8 +1108,8 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { - Parameters [3] { Parameter #0 [ <required> $num ] - Parameter #1 [ <optional> $must_be_strong ] - Parameter #2 [ <optional> &$returned_strong_result ] + Parameter #1 [ <optional> $must_be_strong = <default> ] + Parameter #2 [ <optional> &$returned_strong_result = <default> ] } } @@ -849,18 +1117,21 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { - Parameters [2] { Parameter #0 [ <required> $buf ] - Parameter #1 [ <optional> $entropy ] + Parameter #1 [ <optional> $entropy = <default> ] } } Method [ <internal:crypto> static public method cleanup ] { + + - Parameters [0] { + } } Method [ <internal:crypto> static public method loadFile ] { - Parameters [2] { Parameter #0 [ <required> $filename ] - Parameter #1 [ <optional> $max_bytes ] + Parameter #1 [ <optional> $max_bytes = <default> ] } } @@ -879,13 +1150,13 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } } - Class [ <internal:crypto> class Crypto\RandException extends Crypto\CryptoException implements Throwable ] { + Class [ <internal:crypto> class Crypto\RandException extends Crypto\CryptoException implements Stringable, Throwable ] { - Constants [4] { - Constant [ integer GENERATE_PREDICTABLE ] { 1 } - Constant [ integer FILE_WRITE_PREDICTABLE ] { 2 } - Constant [ integer REQUESTED_BYTES_NUMBER_TOO_HIGH ] { 3 } - Constant [ integer SEED_LENGTH_TOO_HIGH ] { 4 } + Constant [ public int GENERATE_PREDICTABLE ] { 1 } + Constant [ public int FILE_WRITE_PREDICTABLE ] { 2 } + Constant [ public int REQUESTED_BYTES_NUMBER_TOO_HIGH ] { 3 } + Constant [ public int SEED_LENGTH_TOO_HIGH ] { 4 } } - Static properties [0] { @@ -895,47 +1166,82 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } - Properties [4] { - Property [ <default> protected $message ] - Property [ <default> protected $code ] - Property [ <default> protected $file ] - Property [ <default> protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { Method [ <internal:Core, inherits Exception, ctor> public method __construct ] { - Parameters [3] { - Parameter #0 [ <optional> $message ] - Parameter #1 [ <optional> $code ] - Parameter #2 [ <optional> $previous ] + Parameter #0 [ <optional> string $message = "" ] + Parameter #1 [ <optional> int $code = 0 ] + Parameter #2 [ <optional> ?Throwable $previous = null ] } } Method [ <internal:Core, inherits Exception> public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] { + + - Parameters [0] { + } } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception, prototype Throwable> public method __toString ] { + Method [ <internal:Core, inherits Exception, prototype Stringable> public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } @@ -959,7 +1265,7 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { - Parameters [2] { Parameter #0 [ <required> $length ] - Parameter #1 [ <optional> $salt ] + Parameter #1 [ <optional> $salt = <default> ] } } @@ -971,6 +1277,9 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } Method [ <internal:crypto> public method getLength ] { + + - Parameters [0] { + } } Method [ <internal:crypto> public method setLength ] { @@ -981,6 +1290,9 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } Method [ <internal:crypto> public method getSalt ] { + + - Parameters [0] { + } } Method [ <internal:crypto> public method setSalt ] { @@ -992,14 +1304,14 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } } - Class [ <internal:crypto> class Crypto\KDFException extends Crypto\CryptoException implements Throwable ] { + Class [ <internal:crypto> class Crypto\KDFException extends Crypto\CryptoException implements Stringable, Throwable ] { - Constants [5] { - Constant [ integer KEY_LENGTH_LOW ] { 1 } - Constant [ integer KEY_LENGTH_HIGH ] { 2 } - Constant [ integer SALT_LENGTH_HIGH ] { 3 } - Constant [ integer PASSWORD_LENGTH_INVALID ] { 4 } - Constant [ integer DERIVATION_FAILED ] { 5 } + Constant [ public int KEY_LENGTH_LOW ] { 1 } + Constant [ public int KEY_LENGTH_HIGH ] { 2 } + Constant [ public int SALT_LENGTH_HIGH ] { 3 } + Constant [ public int PASSWORD_LENGTH_INVALID ] { 4 } + Constant [ public int DERIVATION_FAILED ] { 5 } } - Static properties [0] { @@ -1009,47 +1321,82 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } - Properties [4] { - Property [ <default> protected $message ] - Property [ <default> protected $code ] - Property [ <default> protected $file ] - Property [ <default> protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { Method [ <internal:Core, inherits Exception, ctor> public method __construct ] { - Parameters [3] { - Parameter #0 [ <optional> $message ] - Parameter #1 [ <optional> $code ] - Parameter #2 [ <optional> $previous ] + Parameter #0 [ <optional> string $message = "" ] + Parameter #1 [ <optional> int $code = 0 ] + Parameter #2 [ <optional> ?Throwable $previous = null ] } } Method [ <internal:Core, inherits Exception> public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] { + + - Parameters [0] { + } } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception, prototype Throwable> public method __toString ] { + Method [ <internal:Core, inherits Exception, prototype Stringable> public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } @@ -1074,8 +1421,8 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { - Parameters [4] { Parameter #0 [ <required> $hashAlgorithm ] Parameter #1 [ <required> $length ] - Parameter #2 [ <optional> $salt ] - Parameter #3 [ <optional> $iterations ] + Parameter #2 [ <optional> $salt = <default> ] + Parameter #3 [ <optional> $iterations = <default> ] } } @@ -1087,6 +1434,9 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } Method [ <internal:crypto> public method getIterations ] { + + - Parameters [0] { + } } Method [ <internal:crypto> public method setIterations ] { @@ -1097,6 +1447,9 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } Method [ <internal:crypto> public method getHashAlgorithm ] { + + - Parameters [0] { + } } Method [ <internal:crypto> public method setHashAlgorithm ] { @@ -1107,6 +1460,9 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } Method [ <internal:crypto, inherits Crypto\KDF> public method getLength ] { + + - Parameters [0] { + } } Method [ <internal:crypto, inherits Crypto\KDF> public method setLength ] { @@ -1117,6 +1473,9 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } Method [ <internal:crypto, inherits Crypto\KDF> public method getSalt ] { + + - Parameters [0] { + } } Method [ <internal:crypto, inherits Crypto\KDF> public method setSalt ] { @@ -1128,16 +1487,16 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } } - Class [ <internal:crypto> class Crypto\PBKDF2Exception extends Crypto\KDFException implements Throwable ] { + Class [ <internal:crypto> class Crypto\PBKDF2Exception extends Crypto\KDFException implements Throwable, Stringable ] { - Constants [7] { - Constant [ integer KEY_LENGTH_LOW ] { 1 } - Constant [ integer KEY_LENGTH_HIGH ] { 2 } - Constant [ integer SALT_LENGTH_HIGH ] { 3 } - Constant [ integer PASSWORD_LENGTH_INVALID ] { 4 } - Constant [ integer DERIVATION_FAILED ] { 5 } - Constant [ integer HASH_ALGORITHM_NOT_FOUND ] { 1 } - Constant [ integer ITERATIONS_HIGH ] { 2 } + Constant [ public int KEY_LENGTH_LOW ] { 1 } + Constant [ public int KEY_LENGTH_HIGH ] { 2 } + Constant [ public int SALT_LENGTH_HIGH ] { 3 } + Constant [ public int PASSWORD_LENGTH_INVALID ] { 4 } + Constant [ public int DERIVATION_FAILED ] { 5 } + Constant [ public int HASH_ALGORITHM_NOT_FOUND ] { 1 } + Constant [ public int ITERATIONS_HIGH ] { 2 } } - Static properties [0] { @@ -1147,47 +1506,82 @@ Extension [ <persistent> extension #78 crypto version 0.3.1 ] { } - Properties [4] { - Property [ <default> protected $message ] - Property [ <default> protected $code ] - Property [ <default> protected $file ] - Property [ <default> protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { Method [ <internal:Core, inherits Exception, ctor> public method __construct ] { - Parameters [3] { - Parameter #0 [ <optional> $message ] - Parameter #1 [ <optional> $code ] - Parameter #2 [ <optional> $previous ] + Parameter #0 [ <optional> string $message = "" ] + Parameter #1 [ <optional> int $code = 0 ] + Parameter #2 [ <optional> ?Throwable $previous = null ] } } Method [ <internal:Core, inherits Exception> public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] { + + - Parameters [0] { + } } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception, prototype Throwable> public method __toString ] { + Method [ <internal:Core, inherits Exception, prototype Stringable> public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } diff --git a/php-pecl-crypto.spec b/php-pecl-crypto.spec index ba29450..d775069 100644 --- a/php-pecl-crypto.spec +++ b/php-pecl-crypto.spec @@ -1,93 +1,50 @@ # remirepo spec file for php-pecl-crypto # -# Copyright (c) 2013-2018 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2013-2024 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -# we don't want -z defs linker flag -%undefine _strict_symbol_defs_build +%{?scl:%scl_package php-pecl-crypto} -%if 0%{?scl:1} -%global sub_prefix %{scl_prefix} -%scl_package php-pecl-crypto -%endif - -%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} -%global pecl_name crypto -%global with_tests 0%{!?_without_tests:1} +%bcond_without tests +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} +%global pecl_name crypto %if "%{php_version}" < "5.6" -%global ini_name %{pecl_name}.ini +%global ini_name %{pecl_name}.ini %else -%global ini_name 40-%{pecl_name}.ini +%global ini_name 40-%{pecl_name}.ini %endif +%global sources %{pecl_name}-%{version} +%global _configure ../%{sources}/configure Summary: Wrapper for OpenSSL Crypto Library -Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 0.3.1 -Release: 8%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -License: BSD -URL: http://pecl.php.net/package/%{pecl_name} -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Name: %{?scl_prefix}php-pecl-%{pecl_name} +Version: 0.3.2 +Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +License: PHP-3.01 +URL: https://pecl.php.net/package/%{pecl_name} +Source0: https://pecl.php.net/get/%{sources}.tgz +Patch0: 0001-Fix-Wincompatible-pointer-types.patch +Patch1: 0001-fix-for-PHP-8.4.patch + +BuildRequires: make BuildRequires: %{?dtsprefix}gcc -BuildRequires: %{?scl_prefix}php-devel > 5.3 +BuildRequires: %{?scl_prefix}php-devel BuildRequires: %{?scl_prefix}php-pear # don't use pkg-config to avoid compat-openssl10 BuildRequires: openssl-devel Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} Provides: %{?scl_prefix}php-%{pecl_name} = %{version} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} -%if "%{?scl_prefix}" != "%{?sub_prefix}" -Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} -%endif - -%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -Obsoletes: php53-pecl-%{pecl_name} <= %{version} -Obsoletes: php53u-pecl-%{pecl_name} <= %{version} -Obsoletes: php54-pecl-%{pecl_name} <= %{version} -Obsoletes: php54w-pecl-%{pecl_name} <= %{version} -%if "%{php_version}" > "5.5" -Obsoletes: php55u-pecl-%{pecl_name} <= %{version} -Obsoletes: php55w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "5.6" -Obsoletes: php56u-pecl-%{pecl_name} <= %{version} -Obsoletes: php56w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.0" -Obsoletes: php70u-pecl-%{pecl_name} <= %{version} -Obsoletes: php70w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.1" -Obsoletes: php71u-pecl-%{pecl_name} <= %{version} -Obsoletes: php71w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.2" -Obsoletes: php72u-pecl-%{pecl_name} <= %{version} -Obsoletes: php72w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.3" -Obsoletes: php73-pecl-%{pecl_name} <= %{version} -Obsoletes: php73w-pecl-%{pecl_name} <= %{version} -%endif -%endif - -%if 0%{?fedora} < 20 && 0%{?rhel} < 7 -# Filter shared private -%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} -%{?filter_setup} -%endif %description @@ -98,14 +55,15 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -c -mv %{pecl_name}-%{version} NTS # Don't install/register tests sed -e 's/role="test"/role="src"/' \ - %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ + -e '/LICENSE/s/role="doc"/role="src"/' \ -i package.xml -cd NTS +cd %{sources} +%patch -P0 -p1 +%patch -P1 -p1 # Sanity check, really often broken extver=$(sed -n '/#define PHP_CRYPTO_VERSION/{s/.* "//;s/".*$//;p}' php_crypto.h) @@ -115,9 +73,9 @@ if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then fi cd .. +mkdir NTS %if %{with_zts} -# Duplicate source tree for NTS / ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif # Create configuration file @@ -130,27 +88,32 @@ EOF %build %{?dtsenable} -cd NTS -%{_bindir}/phpize +cd %{sources} +%{__phpize} +[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global +sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL + +cd ../NTS %configure \ --with-crypto \ - --with-php-config=%{_bindir}/php-config -make %{?_smp_mflags} + --with-php-config=%{__phpconfig} + +%make_build %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize %configure \ --with-crypto \ - --with-php-config=%{_bindir}/zts-php-config -make %{?_smp_mflags} + --with-php-config=%{__ztsphpconfig} + +%make_build %endif %install %{?dtsenable} -make -C NTS install INSTALL_ROOT=%{buildroot} +%make_install -C NTS # install config file install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} @@ -159,80 +122,51 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml %if %{with_zts} -make -C ZTS install INSTALL_ROOT=%{buildroot} +%make_install -C ZTS install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # Documentation for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done -%if 0%{?fedora} < 24 && 0%{?rhel} < 8 -# when pear installed alone, after us -%triggerin -- %{?scl_prefix}php-pear -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -# posttrans as pear can be installed after us -%posttrans -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -%postun -if [ $1 -eq 0 -a -x %{__pecl} ] ; then - %{pecl_uninstall} %{pecl_name} >/dev/null || : -fi -%endif - - %check -%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8 -: Ignore tests broken by new algo -rm ?TS/tests/Cipher_getAlgorithms_all_basic.phpt -rm ?TS/tests/Cipher_getAlgorithms_ccm_basic.phpt -rm ?TS/tests/Hash_getAlgorithms_basic.phpt -%endif +cd %{sources} -cd NTS : Minimal load test for NTS extension %{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --modules | grep '^%{pecl_name}$' -%if %{with_tests} +%if %{with tests} : Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{__php} \ -TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ -NO_INTERACTION=1 \ +TEST_PHP_ARGS="-n -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ -%{__php} -n run-tests.php --show-diff +%{__php} -n run-tests.php -q --show-diff %endif %if %{with_zts} -cd ../ZTS : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ --define extension=%{buildroot}%{php_ztsextdir}//%{pecl_name}.so \ - --modules | grep %{pecl_name} + --modules | grep '^%{pecl_name}$' -%if %{with_tests} +%if %{with tests} : Upstream test suite for ZTS extension TEST_PHP_EXECUTABLE=%{__ztsphp} \ -TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ -NO_INTERACTION=1 \ +TEST_PHP_ARGS="-n -d extension=$PWD/../ZTS/modules/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ -%{__ztsphp} -n run-tests.php --show-diff +%{__ztsphp} -n run-tests.php -q --show-diff %endif %endif %files -%{?_licensedir:%license NTS/LICENSE} +%license %{sources}/LICENSE %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} @@ -246,6 +180,23 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Wed Sep 25 2024 Remi Collet <remi@remirepo.net> - 0.3.2-4 +- fix build with PHP 8.4 using patch from + https://github.com/bukka/php-crypto/pull/42 + +* Fri Feb 16 2024 Remi Collet <remi@remirepo.net> - 0.3.2-3 +- fix [-Wincompatible-pointer-types] using patch from + https://github.com/bukka/php-crypto/pull/40 + +* Thu Aug 31 2023 Remi Collet <remi@remirepo.net> - 0.3.2-2 +- build out of sources tree + +* Mon Mar 8 2021 Remi Collet <remi@remirepo.net> - 0.3.2-1 +- update to 0.3.2 + +* Tue Sep 03 2019 Remi Collet <remi@remirepo.net> - 0.3.1-9 +- rebuild for 7.4.0RC1 + * Tue Jul 23 2019 Remi Collet <remi@remirepo.net> - 0.3.1-8 - rebuild for 7.4.0beta1 |