From 55d5bace0e58a050c6f849a72f732ac6a26e46b1 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Fri, 19 Sep 2014 01:59:55 +0200 Subject: more usages for ZEND_SECURE_ZERO() --- ext/hash/hash_haval.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'ext/hash/hash_haval.c') diff --git a/ext/hash/hash_haval.c b/ext/hash/hash_haval.c index 32437cecdf..0d0adf7ba1 100644 --- a/ext/hash/hash_haval.c +++ b/ext/hash/hash_haval.c @@ -169,7 +169,7 @@ static void PHP_3HAVALTransform(php_hash_uint32 state[8], const unsigned char bl } /* Zeroize sensitive information. */ - memset((unsigned char*) x, 0, sizeof(x)); + ZEND_SECURE_ZERO((unsigned char*) x, sizeof(x)); } /* }}} */ @@ -206,7 +206,7 @@ static void PHP_4HAVALTransform(php_hash_uint32 state[8], const unsigned char bl } /* Zeroize sensitive information. */ - memset((unsigned char*) x, 0, sizeof(x)); + ZEND_SECURE_ZERO((unsigned char*) x, sizeof(x)); } /* }}} */ @@ -245,7 +245,7 @@ static void PHP_5HAVALTransform(php_hash_uint32 state[8], const unsigned char bl } /* Zeroize sensitive information. */ - memset((unsigned char*) x, 0, sizeof(x)); + ZEND_SECURE_ZERO((unsigned char*) x, sizeof(x)); } /* }}} */ @@ -368,7 +368,7 @@ PHP_HASH_API void PHP_HAVAL128Final(unsigned char *digest, PHP_HAVAL_CTX * conte /* Zeroize sensitive information. */ - memset((unsigned char*) context, 0, sizeof(*context)); + ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); } /* }}} */ @@ -422,7 +422,7 @@ PHP_HASH_API void PHP_HAVAL160Final(unsigned char *digest, PHP_HAVAL_CTX * conte /* Zeroize sensitive information. */ - memset((unsigned char*) context, 0, sizeof(*context)); + ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); } /* }}} */ @@ -462,7 +462,7 @@ PHP_HASH_API void PHP_HAVAL192Final(unsigned char *digest, PHP_HAVAL_CTX * conte /* Zeroize sensitive information. */ - memset((unsigned char*) context, 0, sizeof(*context)); + ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); } /* }}} */ @@ -503,7 +503,7 @@ PHP_HASH_API void PHP_HAVAL224Final(unsigned char *digest, PHP_HAVAL_CTX * conte /* Zeroize sensitive information. */ - memset((unsigned char*) context, 0, sizeof(*context)); + ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); } /* }}} */ @@ -537,7 +537,7 @@ PHP_HASH_API void PHP_HAVAL256Final(unsigned char *digest, PHP_HAVAL_CTX * conte /* Zeroize sensitive information. */ - memset((unsigned char*) context, 0, sizeof(*context)); + ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); } /* }}} */ -- cgit v1.2.1