summaryrefslogtreecommitdiff
path: root/ext/hash/hash.c
diff options
context:
space:
mode:
authorMax Semenik <maxsem.wiki@gmail.com>2020-07-01 16:32:55 +0300
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-07-06 21:13:34 +0200
commit2b5de6f839feea0ae1d5289d59dd7f159fcdcc8c (patch)
treef23a5c00a96f30a62ddcf626b4c6a6d53809d14f /ext/hash/hash.c
parent47579986504022d3eab38e24fff5861d5e4eadad (diff)
downloadphp-git-2b5de6f839feea0ae1d5289d59dd7f159fcdcc8c.tar.gz
Remove proto comments from C files
Closes GH-5758
Diffstat (limited to 'ext/hash/hash.c')
-rw-r--r--ext/hash/hash.c81
1 files changed, 27 insertions, 54 deletions
diff --git a/ext/hash/hash.c b/ext/hash/hash.c
index 469d91e34b..40746ea003 100644
--- a/ext/hash/hash.c
+++ b/ext/hash/hash.c
@@ -416,8 +416,7 @@ static void php_hash_do_hash(INTERNAL_FUNCTION_PARAMETERS, int isfilename, zend_
}
/* }}} */
-/* {{{ proto string hash(string algo, string data[, bool raw_output = false])
-Generate a hash of a given input string
+/* {{{ Generate a hash of a given input string
Returns lowercase hexits by default */
PHP_FUNCTION(hash)
{
@@ -425,8 +424,7 @@ PHP_FUNCTION(hash)
}
/* }}} */
-/* {{{ proto string hash_file(string algo, string filename[, bool raw_output = false])
-Generate a hash of a given file
+/* {{{ Generate a hash of a given file
Returns lowercase hexits by default */
PHP_FUNCTION(hash_file)
{
@@ -554,8 +552,7 @@ static void php_hash_do_hash_hmac(INTERNAL_FUNCTION_PARAMETERS, int isfilename,
}
/* }}} */
-/* {{{ proto string hash_hmac(string algo, string data, string key[, bool raw_output = false])
-Generate a hash of a given input string with a key using HMAC
+/* {{{ Generate a hash of a given input string with a key using HMAC
Returns lowercase hexits by default */
PHP_FUNCTION(hash_hmac)
{
@@ -563,8 +560,7 @@ PHP_FUNCTION(hash_hmac)
}
/* }}} */
-/* {{{ proto string hash_hmac_file(string algo, string filename, string key[, bool raw_output = false])
-Generate a hash of a given file with a key using HMAC
+/* {{{ Generate a hash of a given file with a key using HMAC
Returns lowercase hexits by default */
PHP_FUNCTION(hash_hmac_file)
{
@@ -572,8 +568,7 @@ PHP_FUNCTION(hash_hmac_file)
}
/* }}} */
-/* {{{ proto HashContext hash_init(string algo[, int options, string key])
-Initialize a hashing context */
+/* {{{ Initialize a hashing context */
PHP_FUNCTION(hash_init)
{
zend_string *algo, *key = NULL;
@@ -649,8 +644,7 @@ PHP_FUNCTION(hash_init)
} \
}
-/* {{{ proto bool hash_update(HashContext context, string data)
-Pump data into the hashing algorithm */
+/* {{{ Pump data into the hashing algorithm */
PHP_FUNCTION(hash_update)
{
zval *zhash;
@@ -669,8 +663,7 @@ PHP_FUNCTION(hash_update)
}
/* }}} */
-/* {{{ proto int hash_update_stream(HashContext context, resource handle[, int length])
-Pump data into the hashing algorithm from an open stream */
+/* {{{ Pump data into the hashing algorithm from an open stream */
PHP_FUNCTION(hash_update_stream)
{
zval *zhash, *zstream;
@@ -707,8 +700,7 @@ PHP_FUNCTION(hash_update_stream)
}
/* }}} */
-/* {{{ proto bool hash_update_file(HashContext context, string filename[, resource context])
-Pump data into the hashing algorithm from a file */
+/* {{{ Pump data into the hashing algorithm from a file */
PHP_FUNCTION(hash_update_file)
{
zval *zhash, *zcontext = NULL;
@@ -742,8 +734,7 @@ PHP_FUNCTION(hash_update_file)
}
/* }}} */
-/* {{{ proto string hash_final(HashContext context[, bool raw_output=false])
-Output resulting digest */
+/* {{{ Output resulting digest */
PHP_FUNCTION(hash_final)
{
zval *zhash;
@@ -801,8 +792,7 @@ PHP_FUNCTION(hash_final)
}
/* }}} */
-/* {{{ proto HashContext hash_copy(HashContext context)
-Copy hash object */
+/* {{{ Copy hash object */
PHP_FUNCTION(hash_copy)
{
zval *zhash;
@@ -822,8 +812,7 @@ PHP_FUNCTION(hash_copy)
}
/* }}} */
-/* {{{ proto array hash_algos(void)
-Return a list of registered hashing algorithms */
+/* {{{ Return a list of registered hashing algorithms */
PHP_FUNCTION(hash_algos)
{
zend_string *str;
@@ -839,8 +828,7 @@ PHP_FUNCTION(hash_algos)
}
/* }}} */
-/* {{{ proto array hash_hmac_algos(void)
-Return a list of registered hashing algorithms suitable for hash_hmac() */
+/* {{{ Return a list of registered hashing algorithms suitable for hash_hmac() */
PHP_FUNCTION(hash_hmac_algos)
{
zend_string *str;
@@ -859,8 +847,7 @@ PHP_FUNCTION(hash_hmac_algos)
}
/* }}} */
-/* {{{ proto string hash_hkdf(string algo, string ikm [, int length = 0, string info = '', string salt = ''])
-RFC5869 HMAC-based key derivation function */
+/* {{{ RFC5869 HMAC-based key derivation function */
PHP_FUNCTION(hash_hkdf)
{
zend_string *returnval, *ikm, *algo, *info = NULL, *salt = NULL;
@@ -952,8 +939,7 @@ PHP_FUNCTION(hash_hkdf)
RETURN_STR(returnval);
}
-/* {{{ proto string hash_pbkdf2(string algo, string password, string salt, int iterations [, int length = 0, bool raw_output = false])
-Generate a PBKDF2 hash of the given password and salt
+/* {{{ Generate a PBKDF2 hash of the given password and salt
Returns lowercase hexits by default */
PHP_FUNCTION(hash_pbkdf2)
{
@@ -1077,8 +1063,7 @@ PHP_FUNCTION(hash_pbkdf2)
}
/* }}} */
-/* {{{ proto bool hash_equals(string known_string, string user_string)
- Compares two strings using the same time whether they're equal or not.
+/* {{{ Compares two strings using the same time whether they're equal or not.
A difference in length will leak */
PHP_FUNCTION(hash_equals)
{
@@ -1118,7 +1103,7 @@ PHP_FUNCTION(hash_equals)
}
/* }}} */
-/* {{{ proto HashContext::__construct() */
+/* {{{ */
PHP_METHOD(HashContext, __construct) {
/* Normally unreachable as private/final */
zend_throw_exception(zend_ce_error, "Illegal call to private/final constructor", 0);
@@ -1175,8 +1160,7 @@ static void mhash_init(INIT_FUNC_ARGS)
/* TODO: this cause #69823 zend_register_internal_module(&mhash_module_entry); */
}
-/* {{{ proto string mhash(int hash, string data [, string key])
- Hash data with hash */
+/* {{{ Hash data with hash */
PHP_FUNCTION(mhash)
{
zval *z_algorithm;
@@ -1206,8 +1190,7 @@ PHP_FUNCTION(mhash)
}
/* }}} */
-/* {{{ proto string mhash_get_hash_name(int hash)
- Gets the name of hash */
+/* {{{ Gets the name of hash */
PHP_FUNCTION(mhash_get_hash_name)
{
zend_long algorithm;
@@ -1226,8 +1209,7 @@ PHP_FUNCTION(mhash_get_hash_name)
}
/* }}} */
-/* {{{ proto int mhash_count(void)
- Gets the number of available hashes */
+/* {{{ Gets the number of available hashes */
PHP_FUNCTION(mhash_count)
{
if (zend_parse_parameters_none() == FAILURE) {
@@ -1237,8 +1219,7 @@ PHP_FUNCTION(mhash_count)
}
/* }}} */
-/* {{{ proto int mhash_get_block_size(int hash)
- Gets the block size of hash */
+/* {{{ Gets the block size of hash */
PHP_FUNCTION(mhash_get_block_size)
{
zend_long algorithm;
@@ -1262,8 +1243,7 @@ PHP_FUNCTION(mhash_get_block_size)
#define SALT_SIZE 8
-/* {{{ proto string mhash_keygen_s2k(int hash, string input_password, string salt, int bytes)
- Generates a key using hash functions */
+/* {{{ Generates a key using hash functions */
PHP_FUNCTION(mhash_keygen_s2k)
{
zend_long algorithm, l_bytes;
@@ -1417,8 +1397,7 @@ static zend_object *php_hashcontext_clone(zend_object *zobj) {
Currently HASH_HMAC contexts cannot be serialized, because serializing them
would require serializing the HMAC key in plaintext. */
-/* {{{ proto array HashContext::__serialize()
- Serialize the object */
+/* {{{ Serialize the object */
PHP_METHOD(HashContext, __serialize)
{
zval *object = ZEND_THIS;
@@ -1466,9 +1445,7 @@ serialize_failure:
}
/* }}} */
-/* {{{ proto void HashContext::__unserialize(array serialized)
- * unserialize the object
- */
+/* {{{ unserialize the object */
PHP_METHOD(HashContext, __unserialize)
{
zval *object = ZEND_THIS;
@@ -1536,8 +1513,7 @@ PHP_METHOD(HashContext, __unserialize)
}
/* }}} */
-/* {{{ PHP_MINIT_FUNCTION
- */
+/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(hash)
{
zend_class_entry ce;
@@ -1622,8 +1598,7 @@ PHP_MINIT_FUNCTION(hash)
}
/* }}} */
-/* {{{ PHP_MSHUTDOWN_FUNCTION
- */
+/* {{{ PHP_MSHUTDOWN_FUNCTION */
PHP_MSHUTDOWN_FUNCTION(hash)
{
zend_hash_destroy(&php_hash_hashtable);
@@ -1632,8 +1607,7 @@ PHP_MSHUTDOWN_FUNCTION(hash)
}
/* }}} */
-/* {{{ PHP_MINFO_FUNCTION
- */
+/* {{{ PHP_MINFO_FUNCTION */
PHP_MINFO_FUNCTION(hash)
{
char buffer[2048];
@@ -1660,8 +1634,7 @@ PHP_MINFO_FUNCTION(hash)
}
/* }}} */
-/* {{{ hash_module_entry
- */
+/* {{{ hash_module_entry */
zend_module_entry hash_module_entry = {
STANDARD_MODULE_HEADER,
PHP_HASH_EXTNAME,