summaryrefslogtreecommitdiff
path: root/ext/hash/hash_md.c
diff options
context:
space:
mode:
authorNuno Lopes <nlopess@php.net>2007-01-08 22:29:25 +0000
committerNuno Lopes <nlopess@php.net>2007-01-08 22:29:25 +0000
commitec66c5be3d62b90c0031906f2cbfb51efe62134e (patch)
treedd2333697a22545283948c660c4d00d4ff40958f /ext/hash/hash_md.c
parentcdfed7f75713bca9e7703019bbe8c329a8f397a2 (diff)
downloadphp-git-ec66c5be3d62b90c0031906f2cbfb51efe62134e.tar.gz
make the hash_ops structures const and save some memory
# ram memory is so expensive these days...
Diffstat (limited to 'ext/hash/hash_md.c')
-rw-r--r--ext/hash/hash_md.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/hash/hash_md.c b/ext/hash/hash_md.c
index b1153093e8..0da72c9d43 100644
--- a/ext/hash/hash_md.c
+++ b/ext/hash/hash_md.c
@@ -21,7 +21,7 @@
#include "php_hash.h"
#include "php_hash_md.h"
-php_hash_ops php_hash_md5_ops = {
+const php_hash_ops php_hash_md5_ops = {
(php_hash_init_func_t) PHP_MD5Init,
(php_hash_update_func_t) PHP_MD5Update,
(php_hash_final_func_t) PHP_MD5Final,
@@ -30,7 +30,7 @@ php_hash_ops php_hash_md5_ops = {
sizeof(PHP_MD5_CTX)
};
-php_hash_ops php_hash_md4_ops = {
+const php_hash_ops php_hash_md4_ops = {
(php_hash_init_func_t) PHP_MD4Init,
(php_hash_update_func_t) PHP_MD4Update,
(php_hash_final_func_t) PHP_MD4Final,
@@ -39,7 +39,7 @@ php_hash_ops php_hash_md4_ops = {
sizeof(PHP_MD4_CTX)
};
-php_hash_ops php_hash_md2_ops = {
+const php_hash_ops php_hash_md2_ops = {
(php_hash_init_func_t) PHP_MD2Init,
(php_hash_update_func_t) PHP_MD2Update,
(php_hash_final_func_t) PHP_MD2Final,
@@ -50,7 +50,7 @@ php_hash_ops php_hash_md2_ops = {
/* MD common stuff */
-static unsigned char PADDING[64] =
+static const unsigned char PADDING[64] =
{
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -590,7 +590,7 @@ PHP_HASH_API void PHP_MD4Final(unsigned char digest[16], PHP_MD4_CTX * context)
/* MD2 */
-static unsigned char MD2_S[256] = {
+static const unsigned char MD2_S[256] = {
41, 46, 67, 201, 162, 216, 124, 1, 61, 54, 84, 161, 236, 240, 6, 19,
98, 167, 5, 243, 192, 199, 115, 140, 152, 147, 43, 217, 188, 76, 130, 202,
30, 155, 87, 60, 253, 212, 224, 22, 103, 66, 111, 24, 138, 23, 229, 18,