Lines Matching refs:context

41 static void WhirlpoolTransform(PHP_WHIRLPOOL_CTX *context)  in WhirlpoolTransform()  argument
48 unsigned char *buffer = context->buffer.data; in WhirlpoolTransform()
67 state[0] = block[0] ^ (K[0] = context->state[0]); in WhirlpoolTransform()
68 state[1] = block[1] ^ (K[1] = context->state[1]); in WhirlpoolTransform()
69 state[2] = block[2] ^ (K[2] = context->state[2]); in WhirlpoolTransform()
70 state[3] = block[3] ^ (K[3] = context->state[3]); in WhirlpoolTransform()
71 state[4] = block[4] ^ (K[4] = context->state[4]); in WhirlpoolTransform()
72 state[5] = block[5] ^ (K[5] = context->state[5]); in WhirlpoolTransform()
73 state[6] = block[6] ^ (K[6] = context->state[6]); in WhirlpoolTransform()
74 state[7] = block[7] ^ (K[7] = context->state[7]); in WhirlpoolTransform()
258 context->state[0] ^= state[0] ^ block[0]; in WhirlpoolTransform()
259 context->state[1] ^= state[1] ^ block[1]; in WhirlpoolTransform()
260 context->state[2] ^= state[2] ^ block[2]; in WhirlpoolTransform()
261 context->state[3] ^= state[3] ^ block[3]; in WhirlpoolTransform()
262 context->state[4] ^= state[4] ^ block[4]; in WhirlpoolTransform()
263 context->state[5] ^= state[5] ^ block[5]; in WhirlpoolTransform()
264 context->state[6] ^= state[6] ^ block[6]; in WhirlpoolTransform()
265 context->state[7] ^= state[7] ^ block[7]; in WhirlpoolTransform()
270 PHP_HASH_API void PHP_WHIRLPOOLInit(PHP_WHIRLPOOL_CTX *context) in PHP_WHIRLPOOLInit() argument
272 memset(context, 0, sizeof(*context)); in PHP_WHIRLPOOLInit()
275 PHP_HASH_API void PHP_WHIRLPOOLUpdate(PHP_WHIRLPOOL_CTX *context, const unsigned char *input, size_… in PHP_WHIRLPOOLUpdate() argument
280 int bufferRem = context->buffer.bits & 7; /* occupied bits on buffer[bufferPos]. */ in PHP_WHIRLPOOLUpdate()
282 unsigned char *buffer = context->buffer.data; in PHP_WHIRLPOOLUpdate()
283 unsigned char *bitLength = context->bitlength; in PHP_WHIRLPOOLUpdate()
284 int bufferBits = context->buffer.bits; in PHP_WHIRLPOOLUpdate()
285 int bufferPos = context->buffer.pos; in PHP_WHIRLPOOLUpdate()
318 WhirlpoolTransform(context); in PHP_WHIRLPOOLUpdate()
364 WhirlpoolTransform(context); in PHP_WHIRLPOOLUpdate()
373 context->buffer.bits = bufferBits; in PHP_WHIRLPOOLUpdate()
374 context->buffer.pos = bufferPos; in PHP_WHIRLPOOLUpdate()
377 PHP_HASH_API void PHP_WHIRLPOOLFinal(unsigned char digest[64], PHP_WHIRLPOOL_CTX *context) in PHP_WHIRLPOOLFinal() argument
380 unsigned char *buffer = context->buffer.data; in PHP_WHIRLPOOLFinal()
381 unsigned char *bitLength = context->bitlength; in PHP_WHIRLPOOLFinal()
382 int bufferBits = context->buffer.bits; in PHP_WHIRLPOOLFinal()
383 int bufferPos = context->buffer.pos; in PHP_WHIRLPOOLFinal()
400 WhirlpoolTransform(context); in PHP_WHIRLPOOLFinal()
417 WhirlpoolTransform(context); in PHP_WHIRLPOOLFinal()
422 digest[0] = (unsigned char)(context->state[i] >> 56); in PHP_WHIRLPOOLFinal()
423 digest[1] = (unsigned char)(context->state[i] >> 48); in PHP_WHIRLPOOLFinal()
424 digest[2] = (unsigned char)(context->state[i] >> 40); in PHP_WHIRLPOOLFinal()
425 digest[3] = (unsigned char)(context->state[i] >> 32); in PHP_WHIRLPOOLFinal()
426 digest[4] = (unsigned char)(context->state[i] >> 24); in PHP_WHIRLPOOLFinal()
427 digest[5] = (unsigned char)(context->state[i] >> 16); in PHP_WHIRLPOOLFinal()
428 digest[6] = (unsigned char)(context->state[i] >> 8); in PHP_WHIRLPOOLFinal()
429 digest[7] = (unsigned char)(context->state[i] ); in PHP_WHIRLPOOLFinal()
433 ZEND_SECURE_ZERO(context, sizeof(*context)); in PHP_WHIRLPOOLFinal()