Lines Matching refs:context
37 static void WhirlpoolTransform(PHP_WHIRLPOOL_CTX *context) in WhirlpoolTransform() argument
44 unsigned char *buffer = context->buffer.data; in WhirlpoolTransform()
63 state[0] = block[0] ^ (K[0] = context->state[0]); in WhirlpoolTransform()
64 state[1] = block[1] ^ (K[1] = context->state[1]); in WhirlpoolTransform()
65 state[2] = block[2] ^ (K[2] = context->state[2]); in WhirlpoolTransform()
66 state[3] = block[3] ^ (K[3] = context->state[3]); in WhirlpoolTransform()
67 state[4] = block[4] ^ (K[4] = context->state[4]); in WhirlpoolTransform()
68 state[5] = block[5] ^ (K[5] = context->state[5]); in WhirlpoolTransform()
69 state[6] = block[6] ^ (K[6] = context->state[6]); in WhirlpoolTransform()
70 state[7] = block[7] ^ (K[7] = context->state[7]); in WhirlpoolTransform()
254 context->state[0] ^= state[0] ^ block[0]; in WhirlpoolTransform()
255 context->state[1] ^= state[1] ^ block[1]; in WhirlpoolTransform()
256 context->state[2] ^= state[2] ^ block[2]; in WhirlpoolTransform()
257 context->state[3] ^= state[3] ^ block[3]; in WhirlpoolTransform()
258 context->state[4] ^= state[4] ^ block[4]; in WhirlpoolTransform()
259 context->state[5] ^= state[5] ^ block[5]; in WhirlpoolTransform()
260 context->state[6] ^= state[6] ^ block[6]; in WhirlpoolTransform()
261 context->state[7] ^= state[7] ^ block[7]; in WhirlpoolTransform()
266 PHP_HASH_API void PHP_WHIRLPOOLInit(PHP_WHIRLPOOL_CTX *context, ZEND_ATTRIBUTE_UNUSED HashTable *ar… in PHP_WHIRLPOOLInit() argument
268 memset(context, 0, sizeof(*context)); in PHP_WHIRLPOOLInit()
271 PHP_HASH_API void PHP_WHIRLPOOLUpdate(PHP_WHIRLPOOL_CTX *context, const unsigned char *input, size_… in PHP_WHIRLPOOLUpdate() argument
276 int bufferRem = context->buffer.bits & 7; /* occupied bits on buffer[bufferPos]. */ in PHP_WHIRLPOOLUpdate()
278 unsigned char *buffer = context->buffer.data; in PHP_WHIRLPOOLUpdate()
279 unsigned char *bitLength = context->bitlength; in PHP_WHIRLPOOLUpdate()
280 int bufferBits = context->buffer.bits; in PHP_WHIRLPOOLUpdate()
281 int bufferPos = context->buffer.pos; in PHP_WHIRLPOOLUpdate()
314 WhirlpoolTransform(context); in PHP_WHIRLPOOLUpdate()
360 WhirlpoolTransform(context); in PHP_WHIRLPOOLUpdate()
369 context->buffer.bits = bufferBits; in PHP_WHIRLPOOLUpdate()
370 context->buffer.pos = bufferPos; in PHP_WHIRLPOOLUpdate()
373 PHP_HASH_API void PHP_WHIRLPOOLFinal(unsigned char digest[64], PHP_WHIRLPOOL_CTX *context) in PHP_WHIRLPOOLFinal() argument
376 unsigned char *buffer = context->buffer.data; in PHP_WHIRLPOOLFinal()
377 unsigned char *bitLength = context->bitlength; in PHP_WHIRLPOOLFinal()
378 int bufferBits = context->buffer.bits; in PHP_WHIRLPOOLFinal()
379 int bufferPos = context->buffer.pos; in PHP_WHIRLPOOLFinal()
396 WhirlpoolTransform(context); in PHP_WHIRLPOOLFinal()
413 WhirlpoolTransform(context); in PHP_WHIRLPOOLFinal()
418 digest[0] = (unsigned char)(context->state[i] >> 56); in PHP_WHIRLPOOLFinal()
419 digest[1] = (unsigned char)(context->state[i] >> 48); in PHP_WHIRLPOOLFinal()
420 digest[2] = (unsigned char)(context->state[i] >> 40); in PHP_WHIRLPOOLFinal()
421 digest[3] = (unsigned char)(context->state[i] >> 32); in PHP_WHIRLPOOLFinal()
422 digest[4] = (unsigned char)(context->state[i] >> 24); in PHP_WHIRLPOOLFinal()
423 digest[5] = (unsigned char)(context->state[i] >> 16); in PHP_WHIRLPOOLFinal()
424 digest[6] = (unsigned char)(context->state[i] >> 8); in PHP_WHIRLPOOLFinal()
425 digest[7] = (unsigned char)(context->state[i] ); in PHP_WHIRLPOOLFinal()
429 ZEND_SECURE_ZERO(context, sizeof(*context)); in PHP_WHIRLPOOLFinal()
434 PHP_WHIRLPOOL_CTX *ctx = (PHP_WHIRLPOOL_CTX *) hash->context; in php_whirlpool_unserialize()