Skip to content

Commit 4516e22

Browse files
committed
simplify
1 parent 6137150 commit 4516e22

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

crypto_cipher.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ PHP_MINIT_FUNCTION(crypto_cipher)
497497
static inline void php_crypto_cipher_set_algorithm_name(zval *object,
498498
char *algorithm, phpc_str_size_t algorithm_len TSRMLS_DC)
499499
{
500-
#if PHP_VERSION_ID < 80400
500+
#if PHP_VERSION_ID < 80200
501501
php_strtoupper(algorithm, algorithm_len);
502502
#else
503503
zend_str_toupper(algorithm, algorithm_len);
@@ -517,18 +517,14 @@ PHP_CRYPTO_API const EVP_CIPHER *php_crypto_get_cipher_algorithm(
517517
return NULL;
518518
}
519519

520-
#if PHP_VERSION_ID < 80400
520+
#if PHP_VERSION_ID < 80200
521521
php_strtoupper(algorithm, algorithm_len);
522522
#else
523523
zend_str_toupper(algorithm, algorithm_len);
524524
#endif
525525
cipher = EVP_get_cipherbyname(algorithm);
526526
if (!cipher) {
527-
#if PHP_VERSION_ID < 80400
528-
php_strtolower(algorithm, algorithm_len);
529-
#else
530527
zend_str_tolower(algorithm, algorithm_len);
531-
#endif
532528
cipher = EVP_get_cipherbyname(algorithm);
533529
}
534530
return cipher;

crypto_hash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ PHP_MINIT_FUNCTION(crypto_hash)
319319
static inline void php_crypto_hash_set_algorithm_name(zval *object,
320320
char *algorithm, phpc_str_size_t algorithm_len TSRMLS_DC)
321321
{
322-
#if PHP_VERSION_ID < 80400
322+
#if PHP_VERSION_ID < 80200
323323
php_strtoupper(algorithm, algorithm_len);
324324
#else
325325
zend_str_toupper(algorithm, algorithm_len);

0 commit comments

Comments
 (0)