Lines Matching refs:context
39 static void WhirlpoolTransform(PHP_WHIRLPOOL_CTX *context) in WhirlpoolTransform() argument
46 unsigned char *buffer = context->buffer.data; in WhirlpoolTransform()
65 state[0] = block[0] ^ (K[0] = context->state[0]); in WhirlpoolTransform()
66 state[1] = block[1] ^ (K[1] = context->state[1]); in WhirlpoolTransform()
67 state[2] = block[2] ^ (K[2] = context->state[2]); in WhirlpoolTransform()
68 state[3] = block[3] ^ (K[3] = context->state[3]); in WhirlpoolTransform()
69 state[4] = block[4] ^ (K[4] = context->state[4]); in WhirlpoolTransform()
70 state[5] = block[5] ^ (K[5] = context->state[5]); in WhirlpoolTransform()
71 state[6] = block[6] ^ (K[6] = context->state[6]); in WhirlpoolTransform()
72 state[7] = block[7] ^ (K[7] = context->state[7]); in WhirlpoolTransform()
256 context->state[0] ^= state[0] ^ block[0]; in WhirlpoolTransform()
257 context->state[1] ^= state[1] ^ block[1]; in WhirlpoolTransform()
258 context->state[2] ^= state[2] ^ block[2]; in WhirlpoolTransform()
259 context->state[3] ^= state[3] ^ block[3]; in WhirlpoolTransform()
260 context->state[4] ^= state[4] ^ block[4]; in WhirlpoolTransform()
261 context->state[5] ^= state[5] ^ block[5]; in WhirlpoolTransform()
262 context->state[6] ^= state[6] ^ block[6]; in WhirlpoolTransform()
263 context->state[7] ^= state[7] ^ block[7]; in WhirlpoolTransform()
268 PHP_HASH_API void PHP_WHIRLPOOLInit(PHP_WHIRLPOOL_CTX *context) in PHP_WHIRLPOOLInit() argument
270 memset(context, 0, sizeof(*context)); in PHP_WHIRLPOOLInit()
273 PHP_HASH_API void PHP_WHIRLPOOLUpdate(PHP_WHIRLPOOL_CTX *context, const unsigned char *input, size_… in PHP_WHIRLPOOLUpdate() argument
278 int bufferRem = context->buffer.bits & 7; /* occupied bits on buffer[bufferPos]. */ in PHP_WHIRLPOOLUpdate()
280 unsigned char *buffer = context->buffer.data; in PHP_WHIRLPOOLUpdate()
281 unsigned char *bitLength = context->bitlength; in PHP_WHIRLPOOLUpdate()
282 int bufferBits = context->buffer.bits; in PHP_WHIRLPOOLUpdate()
283 int bufferPos = context->buffer.pos; in PHP_WHIRLPOOLUpdate()
316 WhirlpoolTransform(context); in PHP_WHIRLPOOLUpdate()
362 WhirlpoolTransform(context); in PHP_WHIRLPOOLUpdate()
371 context->buffer.bits = bufferBits; in PHP_WHIRLPOOLUpdate()
372 context->buffer.pos = bufferPos; in PHP_WHIRLPOOLUpdate()
375 PHP_HASH_API void PHP_WHIRLPOOLFinal(unsigned char digest[64], PHP_WHIRLPOOL_CTX *context) in PHP_WHIRLPOOLFinal() argument
378 unsigned char *buffer = context->buffer.data; in PHP_WHIRLPOOLFinal()
379 unsigned char *bitLength = context->bitlength; in PHP_WHIRLPOOLFinal()
380 int bufferBits = context->buffer.bits; in PHP_WHIRLPOOLFinal()
381 int bufferPos = context->buffer.pos; in PHP_WHIRLPOOLFinal()
398 WhirlpoolTransform(context); in PHP_WHIRLPOOLFinal()
415 WhirlpoolTransform(context); in PHP_WHIRLPOOLFinal()
420 digest[0] = (unsigned char)(context->state[i] >> 56); in PHP_WHIRLPOOLFinal()
421 digest[1] = (unsigned char)(context->state[i] >> 48); in PHP_WHIRLPOOLFinal()
422 digest[2] = (unsigned char)(context->state[i] >> 40); in PHP_WHIRLPOOLFinal()
423 digest[3] = (unsigned char)(context->state[i] >> 32); in PHP_WHIRLPOOLFinal()
424 digest[4] = (unsigned char)(context->state[i] >> 24); in PHP_WHIRLPOOLFinal()
425 digest[5] = (unsigned char)(context->state[i] >> 16); in PHP_WHIRLPOOLFinal()
426 digest[6] = (unsigned char)(context->state[i] >> 8); in PHP_WHIRLPOOLFinal()
427 digest[7] = (unsigned char)(context->state[i] ); in PHP_WHIRLPOOLFinal()
431 ZEND_SECURE_ZERO(context, sizeof(*context)); in PHP_WHIRLPOOLFinal()