summaryrefslogtreecommitdiff
path: root/ext/mcrypt
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>1999-05-01 14:41:46 +0000
committerSascha Schumann <sas@php.net>1999-05-01 14:41:46 +0000
commit7e0ee50ed484aae4ebc0601392157c9a79407919 (patch)
tree526524c2df70183e71196b0832ccb939e4949763 /ext/mcrypt
parent8baa86ed515469788e28c16aea4f80029078d03b (diff)
downloadphp-git-7e0ee50ed484aae4ebc0601392157c9a79407919.tar.gz
func name changes, remove arbitrary limit
Diffstat (limited to 'ext/mcrypt')
-rw-r--r--ext/mcrypt/mcrypt.c11
-rw-r--r--ext/mcrypt/php_mcrypt.h2
2 files changed, 6 insertions, 7 deletions
diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c
index 500edfd645..6548ea2c16 100644
--- a/ext/mcrypt/mcrypt.c
+++ b/ext/mcrypt/mcrypt.c
@@ -43,7 +43,7 @@ function_entry mcrypt_functions[] = {
PHP_FE(mcrypt_cbc, NULL)
PHP_FE(mcrypt_cfb, NULL)
PHP_FE(mcrypt_ofb, NULL)
- PHP_FE(mcrypt_get_algorithms_name, NULL)
+ PHP_FE(mcrypt_get_cipher_name, NULL)
PHP_FE(mcrypt_get_block_size, NULL)
PHP_FE(mcrypt_get_key_size, NULL)
PHP_FE(mcrypt_create_iv, NULL)
@@ -215,9 +215,9 @@ PHP_FUNCTION(mcrypt_create_iv)
RETURN_STRINGL(iv, size->value.lval, 0);
}
-/* proto mcrypt_get_algorithms_name(int cipher)
+/* proto mcrypt_get_cipher_name(int cipher)
get the name of cipher */
-PHP_FUNCTION(mcrypt_get_algorithms_name)
+PHP_FUNCTION(mcrypt_get_cipher_name)
{
pval *cipher;
char *str, *nstr;
@@ -322,15 +322,14 @@ PHP_FUNCTION(mcrypt_cbc)
}
MCRYPT_CONVERT;
MCRYPT_SIZE;
- if(ac > 4 && mode == 0) {
+ if(ac > 4) {
MCRYPT_CHECK_IV;
}
td = init_mcrypt_cbc(cipher->value.lval, key->value.str.val, key->value.str.len);
MCRYPT_CHECK_TD_CPY;
- /* iv may be only used in encryption */
- if(ac > 4 && mode == 0) {
+ if(ac > 4) {
mcrypt(td, iv->value.str.val);
}
diff --git a/ext/mcrypt/php_mcrypt.h b/ext/mcrypt/php_mcrypt.h
index 5d511a4816..a76fa27e1f 100644
--- a/ext/mcrypt/php_mcrypt.h
+++ b/ext/mcrypt/php_mcrypt.h
@@ -16,7 +16,7 @@ PHP_FUNCTION(mcrypt_ecb);
PHP_FUNCTION(mcrypt_cbc);
PHP_FUNCTION(mcrypt_cfb);
PHP_FUNCTION(mcrypt_ofb);
-PHP_FUNCTION(mcrypt_get_algorithms_name);
+PHP_FUNCTION(mcrypt_get_cipher_name);
PHP_FUNCTION(mcrypt_get_block_size);
PHP_FUNCTION(mcrypt_get_key_size);
PHP_FUNCTION(mcrypt_create_iv);