Lines Matching refs:context
71 PHP_HASH_API void PHP_RIPEMD128Init(PHP_RIPEMD128_CTX * context) in PHP_RIPEMD128Init() argument
73 context->count[0] = context->count[1] = 0; in PHP_RIPEMD128Init()
76 context->state[0] = 0x67452301; in PHP_RIPEMD128Init()
77 context->state[1] = 0xEFCDAB89; in PHP_RIPEMD128Init()
78 context->state[2] = 0x98BADCFE; in PHP_RIPEMD128Init()
79 context->state[3] = 0x10325476; in PHP_RIPEMD128Init()
86 PHP_HASH_API void PHP_RIPEMD256Init(PHP_RIPEMD256_CTX * context) in PHP_RIPEMD256Init() argument
88 context->count[0] = context->count[1] = 0; in PHP_RIPEMD256Init()
91 context->state[0] = 0x67452301; in PHP_RIPEMD256Init()
92 context->state[1] = 0xEFCDAB89; in PHP_RIPEMD256Init()
93 context->state[2] = 0x98BADCFE; in PHP_RIPEMD256Init()
94 context->state[3] = 0x10325476; in PHP_RIPEMD256Init()
95 context->state[4] = 0x76543210; in PHP_RIPEMD256Init()
96 context->state[5] = 0xFEDCBA98; in PHP_RIPEMD256Init()
97 context->state[6] = 0x89ABCDEF; in PHP_RIPEMD256Init()
98 context->state[7] = 0x01234567; in PHP_RIPEMD256Init()
105 PHP_HASH_API void PHP_RIPEMD160Init(PHP_RIPEMD160_CTX * context) in PHP_RIPEMD160Init() argument
107 context->count[0] = context->count[1] = 0; in PHP_RIPEMD160Init()
110 context->state[0] = 0x67452301; in PHP_RIPEMD160Init()
111 context->state[1] = 0xEFCDAB89; in PHP_RIPEMD160Init()
112 context->state[2] = 0x98BADCFE; in PHP_RIPEMD160Init()
113 context->state[3] = 0x10325476; in PHP_RIPEMD160Init()
114 context->state[4] = 0xC3D2E1F0; in PHP_RIPEMD160Init()
121 PHP_HASH_API void PHP_RIPEMD320Init(PHP_RIPEMD320_CTX * context) in PHP_RIPEMD320Init() argument
123 context->count[0] = context->count[1] = 0; in PHP_RIPEMD320Init()
126 context->state[0] = 0x67452301; in PHP_RIPEMD320Init()
127 context->state[1] = 0xEFCDAB89; in PHP_RIPEMD320Init()
128 context->state[2] = 0x98BADCFE; in PHP_RIPEMD320Init()
129 context->state[3] = 0x10325476; in PHP_RIPEMD320Init()
130 context->state[4] = 0xC3D2E1F0; in PHP_RIPEMD320Init()
131 context->state[5] = 0x76543210; in PHP_RIPEMD320Init()
132 context->state[6] = 0xFEDCBA98; in PHP_RIPEMD320Init()
133 context->state[7] = 0x89ABCDEF; in PHP_RIPEMD320Init()
134 context->state[8] = 0x01234567; in PHP_RIPEMD320Init()
135 context->state[9] = 0x3C2D1E0F; in PHP_RIPEMD320Init()
256 PHP_HASH_API void PHP_RIPEMD128Update(PHP_RIPEMD128_CTX * context, const unsigned char *input, unsi… in PHP_RIPEMD128Update() argument
261 index = (unsigned int) ((context->count[0] >> 3) & 0x3F); in PHP_RIPEMD128Update()
264 if ((context->count[0] += ((php_hash_uint32) inputLen << 3)) < ((php_hash_uint32) inputLen << 3)) { in PHP_RIPEMD128Update()
265 context->count[1]++; in PHP_RIPEMD128Update()
267 context->count[1] += ((php_hash_uint32) inputLen >> 29); in PHP_RIPEMD128Update()
274 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); in PHP_RIPEMD128Update()
275 RIPEMD128Transform(context->state, context->buffer); in PHP_RIPEMD128Update()
278 RIPEMD128Transform(context->state, &input[i]); in PHP_RIPEMD128Update()
287 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], inputLen - i); in PHP_RIPEMD128Update()
354 PHP_HASH_API void PHP_RIPEMD256Update(PHP_RIPEMD256_CTX * context, const unsigned char *input, unsi… in PHP_RIPEMD256Update() argument
359 index = (unsigned int) ((context->count[0] >> 3) & 0x3F); in PHP_RIPEMD256Update()
362 if ((context->count[0] += ((php_hash_uint32) inputLen << 3)) < ((php_hash_uint32) inputLen << 3)) { in PHP_RIPEMD256Update()
363 context->count[1]++; in PHP_RIPEMD256Update()
365 context->count[1] += ((php_hash_uint32) inputLen >> 29); in PHP_RIPEMD256Update()
372 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); in PHP_RIPEMD256Update()
373 RIPEMD256Transform(context->state, context->buffer); in PHP_RIPEMD256Update()
376 RIPEMD256Transform(context->state, &input[i]); in PHP_RIPEMD256Update()
385 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], inputLen - i); in PHP_RIPEMD256Update()
453 PHP_HASH_API void PHP_RIPEMD160Update(PHP_RIPEMD160_CTX * context, const unsigned char *input, unsi… in PHP_RIPEMD160Update() argument
458 index = (unsigned int) ((context->count[0] >> 3) & 0x3F); in PHP_RIPEMD160Update()
461 if ((context->count[0] += ((php_hash_uint32) inputLen << 3)) < ((php_hash_uint32) inputLen << 3)) { in PHP_RIPEMD160Update()
462 context->count[1]++; in PHP_RIPEMD160Update()
464 context->count[1] += ((php_hash_uint32) inputLen >> 29); in PHP_RIPEMD160Update()
471 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); in PHP_RIPEMD160Update()
472 RIPEMD160Transform(context->state, context->buffer); in PHP_RIPEMD160Update()
475 RIPEMD160Transform(context->state, &input[i]); in PHP_RIPEMD160Update()
484 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], inputLen - i); in PHP_RIPEMD160Update()
561 PHP_HASH_API void PHP_RIPEMD320Update(PHP_RIPEMD320_CTX * context, const unsigned char *input, unsi… in PHP_RIPEMD320Update() argument
566 index = (unsigned int) ((context->count[0] >> 3) & 0x3F); in PHP_RIPEMD320Update()
569 if ((context->count[0] += ((php_hash_uint32) inputLen << 3)) < ((php_hash_uint32) inputLen << 3)) { in PHP_RIPEMD320Update()
570 context->count[1]++; in PHP_RIPEMD320Update()
572 context->count[1] += ((php_hash_uint32) inputLen >> 29); in PHP_RIPEMD320Update()
579 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); in PHP_RIPEMD320Update()
580 RIPEMD320Transform(context->state, context->buffer); in PHP_RIPEMD320Update()
583 RIPEMD320Transform(context->state, &input[i]); in PHP_RIPEMD320Update()
592 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], inputLen - i); in PHP_RIPEMD320Update()
624 PHP_HASH_API void PHP_RIPEMD128Final(unsigned char digest[16], PHP_RIPEMD128_CTX * context) in PHP_RIPEMD128Final() argument
630 bits[0] = (unsigned char) (context->count[0] & 0xFF); in PHP_RIPEMD128Final()
631 bits[1] = (unsigned char) ((context->count[0] >> 8) & 0xFF); in PHP_RIPEMD128Final()
632 bits[2] = (unsigned char) ((context->count[0] >> 16) & 0xFF); in PHP_RIPEMD128Final()
633 bits[3] = (unsigned char) ((context->count[0] >> 24) & 0xFF); in PHP_RIPEMD128Final()
634 bits[4] = (unsigned char) (context->count[1] & 0xFF); in PHP_RIPEMD128Final()
635 bits[5] = (unsigned char) ((context->count[1] >> 8) & 0xFF); in PHP_RIPEMD128Final()
636 bits[6] = (unsigned char) ((context->count[1] >> 16) & 0xFF); in PHP_RIPEMD128Final()
637 bits[7] = (unsigned char) ((context->count[1] >> 24) & 0xFF); in PHP_RIPEMD128Final()
641 index = (unsigned int) ((context->count[0] >> 3) & 0x3f); in PHP_RIPEMD128Final()
643 PHP_RIPEMD128Update(context, PADDING, padLen); in PHP_RIPEMD128Final()
646 PHP_RIPEMD128Update(context, bits, 8); in PHP_RIPEMD128Final()
649 RIPEMDEncode(digest, context->state, 16); in PHP_RIPEMD128Final()
653 ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); in PHP_RIPEMD128Final()
661 PHP_HASH_API void PHP_RIPEMD256Final(unsigned char digest[32], PHP_RIPEMD256_CTX * context) in PHP_RIPEMD256Final() argument
667 bits[0] = (unsigned char) (context->count[0] & 0xFF); in PHP_RIPEMD256Final()
668 bits[1] = (unsigned char) ((context->count[0] >> 8) & 0xFF); in PHP_RIPEMD256Final()
669 bits[2] = (unsigned char) ((context->count[0] >> 16) & 0xFF); in PHP_RIPEMD256Final()
670 bits[3] = (unsigned char) ((context->count[0] >> 24) & 0xFF); in PHP_RIPEMD256Final()
671 bits[4] = (unsigned char) (context->count[1] & 0xFF); in PHP_RIPEMD256Final()
672 bits[5] = (unsigned char) ((context->count[1] >> 8) & 0xFF); in PHP_RIPEMD256Final()
673 bits[6] = (unsigned char) ((context->count[1] >> 16) & 0xFF); in PHP_RIPEMD256Final()
674 bits[7] = (unsigned char) ((context->count[1] >> 24) & 0xFF); in PHP_RIPEMD256Final()
678 index = (unsigned int) ((context->count[0] >> 3) & 0x3f); in PHP_RIPEMD256Final()
680 PHP_RIPEMD256Update(context, PADDING, padLen); in PHP_RIPEMD256Final()
683 PHP_RIPEMD256Update(context, bits, 8); in PHP_RIPEMD256Final()
686 RIPEMDEncode(digest, context->state, 32); in PHP_RIPEMD256Final()
690 ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); in PHP_RIPEMD256Final()
698 PHP_HASH_API void PHP_RIPEMD160Final(unsigned char digest[20], PHP_RIPEMD160_CTX * context) in PHP_RIPEMD160Final() argument
704 bits[0] = (unsigned char) (context->count[0] & 0xFF); in PHP_RIPEMD160Final()
705 bits[1] = (unsigned char) ((context->count[0] >> 8) & 0xFF); in PHP_RIPEMD160Final()
706 bits[2] = (unsigned char) ((context->count[0] >> 16) & 0xFF); in PHP_RIPEMD160Final()
707 bits[3] = (unsigned char) ((context->count[0] >> 24) & 0xFF); in PHP_RIPEMD160Final()
708 bits[4] = (unsigned char) (context->count[1] & 0xFF); in PHP_RIPEMD160Final()
709 bits[5] = (unsigned char) ((context->count[1] >> 8) & 0xFF); in PHP_RIPEMD160Final()
710 bits[6] = (unsigned char) ((context->count[1] >> 16) & 0xFF); in PHP_RIPEMD160Final()
711 bits[7] = (unsigned char) ((context->count[1] >> 24) & 0xFF); in PHP_RIPEMD160Final()
715 index = (unsigned int) ((context->count[0] >> 3) & 0x3f); in PHP_RIPEMD160Final()
717 PHP_RIPEMD160Update(context, PADDING, padLen); in PHP_RIPEMD160Final()
720 PHP_RIPEMD160Update(context, bits, 8); in PHP_RIPEMD160Final()
723 RIPEMDEncode(digest, context->state, 20); in PHP_RIPEMD160Final()
727 ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); in PHP_RIPEMD160Final()
735 PHP_HASH_API void PHP_RIPEMD320Final(unsigned char digest[40], PHP_RIPEMD320_CTX * context) in PHP_RIPEMD320Final() argument
741 bits[0] = (unsigned char) (context->count[0] & 0xFF); in PHP_RIPEMD320Final()
742 bits[1] = (unsigned char) ((context->count[0] >> 8) & 0xFF); in PHP_RIPEMD320Final()
743 bits[2] = (unsigned char) ((context->count[0] >> 16) & 0xFF); in PHP_RIPEMD320Final()
744 bits[3] = (unsigned char) ((context->count[0] >> 24) & 0xFF); in PHP_RIPEMD320Final()
745 bits[4] = (unsigned char) (context->count[1] & 0xFF); in PHP_RIPEMD320Final()
746 bits[5] = (unsigned char) ((context->count[1] >> 8) & 0xFF); in PHP_RIPEMD320Final()
747 bits[6] = (unsigned char) ((context->count[1] >> 16) & 0xFF); in PHP_RIPEMD320Final()
748 bits[7] = (unsigned char) ((context->count[1] >> 24) & 0xFF); in PHP_RIPEMD320Final()
752 index = (unsigned int) ((context->count[0] >> 3) & 0x3f); in PHP_RIPEMD320Final()
754 PHP_RIPEMD320Update(context, PADDING, padLen); in PHP_RIPEMD320Final()
757 PHP_RIPEMD320Update(context, bits, 8); in PHP_RIPEMD320Final()
760 RIPEMDEncode(digest, context->state, 40); in PHP_RIPEMD320Final()
764 ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); in PHP_RIPEMD320Final()