Lines Matching refs:K
221 static inline void php_hash_hmac_prep_key(unsigned char *K, const php_hash_ops *ops, void *context,… in php_hash_hmac_prep_key() argument
222 memset(K, 0, ops->block_size); in php_hash_hmac_prep_key()
227 ops->hash_final(K, context); in php_hash_hmac_prep_key()
229 memcpy(K, key, key_len); in php_hash_hmac_prep_key()
232 php_hash_string_xor_char(K, K, 0x36, ops->block_size); in php_hash_hmac_prep_key()
244 char *algo, *data, *digest, *key, *K; in php_hash_do_hash_hmac() local
275 K = emalloc(ops->block_size); in php_hash_do_hash_hmac()
278 php_hash_hmac_prep_key((unsigned char *) K, ops, context, (unsigned char *) key, key_len); in php_hash_do_hash_hmac()
284 ops->hash_update(context, (unsigned char *) K, ops->block_size); in php_hash_do_hash_hmac()
291 …php_hash_hmac_round((unsigned char *) digest, ops, context, (unsigned char *) K, (unsigned char *)… in php_hash_do_hash_hmac()
294 php_hash_string_xor_char((unsigned char *) K, (unsigned char *) K, 0x6A, ops->block_size); in php_hash_do_hash_hmac()
296 …php_hash_hmac_round((unsigned char *) digest, ops, context, (unsigned char *) K, (unsigned char *)… in php_hash_do_hash_hmac()
299 memset(K, 0, ops->block_size); in php_hash_do_hash_hmac()
300 efree(K); in php_hash_do_hash_hmac()
374 char *K = emalloc(ops->block_size); in PHP_FUNCTION() local
377 memset(K, 0, ops->block_size); in PHP_FUNCTION()
382 ops->hash_final((unsigned char *) K, context); in PHP_FUNCTION()
386 memcpy(K, key, key_len); in PHP_FUNCTION()
391 K[i] ^= 0x36; in PHP_FUNCTION()
393 ops->hash_update(context, (unsigned char *) K, ops->block_size); in PHP_FUNCTION()
394 hash->key = (unsigned char *) K; in PHP_FUNCTION()