Lines Matching refs:context

87 PHP_HASH_API void PHP_RIPEMD128Init(PHP_RIPEMD128_CTX * context)  in PHP_RIPEMD128Init()  argument
89 context->count[0] = context->count[1] = 0; in PHP_RIPEMD128Init()
92 context->state[0] = 0x67452301; in PHP_RIPEMD128Init()
93 context->state[1] = 0xEFCDAB89; in PHP_RIPEMD128Init()
94 context->state[2] = 0x98BADCFE; in PHP_RIPEMD128Init()
95 context->state[3] = 0x10325476; in PHP_RIPEMD128Init()
102 PHP_HASH_API void PHP_RIPEMD256Init(PHP_RIPEMD256_CTX * context) in PHP_RIPEMD256Init() argument
104 context->count[0] = context->count[1] = 0; in PHP_RIPEMD256Init()
107 context->state[0] = 0x67452301; in PHP_RIPEMD256Init()
108 context->state[1] = 0xEFCDAB89; in PHP_RIPEMD256Init()
109 context->state[2] = 0x98BADCFE; in PHP_RIPEMD256Init()
110 context->state[3] = 0x10325476; in PHP_RIPEMD256Init()
111 context->state[4] = 0x76543210; in PHP_RIPEMD256Init()
112 context->state[5] = 0xFEDCBA98; in PHP_RIPEMD256Init()
113 context->state[6] = 0x89ABCDEF; in PHP_RIPEMD256Init()
114 context->state[7] = 0x01234567; in PHP_RIPEMD256Init()
121 PHP_HASH_API void PHP_RIPEMD160Init(PHP_RIPEMD160_CTX * context) in PHP_RIPEMD160Init() argument
123 context->count[0] = context->count[1] = 0; in PHP_RIPEMD160Init()
126 context->state[0] = 0x67452301; in PHP_RIPEMD160Init()
127 context->state[1] = 0xEFCDAB89; in PHP_RIPEMD160Init()
128 context->state[2] = 0x98BADCFE; in PHP_RIPEMD160Init()
129 context->state[3] = 0x10325476; in PHP_RIPEMD160Init()
130 context->state[4] = 0xC3D2E1F0; in PHP_RIPEMD160Init()
137 PHP_HASH_API void PHP_RIPEMD320Init(PHP_RIPEMD320_CTX * context) in PHP_RIPEMD320Init() argument
139 context->count[0] = context->count[1] = 0; in PHP_RIPEMD320Init()
142 context->state[0] = 0x67452301; in PHP_RIPEMD320Init()
143 context->state[1] = 0xEFCDAB89; in PHP_RIPEMD320Init()
144 context->state[2] = 0x98BADCFE; in PHP_RIPEMD320Init()
145 context->state[3] = 0x10325476; in PHP_RIPEMD320Init()
146 context->state[4] = 0xC3D2E1F0; in PHP_RIPEMD320Init()
147 context->state[5] = 0x76543210; in PHP_RIPEMD320Init()
148 context->state[6] = 0xFEDCBA98; in PHP_RIPEMD320Init()
149 context->state[7] = 0x89ABCDEF; in PHP_RIPEMD320Init()
150 context->state[8] = 0x01234567; in PHP_RIPEMD320Init()
151 context->state[9] = 0x3C2D1E0F; in PHP_RIPEMD320Init()
272 PHP_HASH_API void PHP_RIPEMD128Update(PHP_RIPEMD128_CTX * context, const unsigned char *input, size… in PHP_RIPEMD128Update() argument
277 index = (unsigned int) ((context->count[0] >> 3) & 0x3F); in PHP_RIPEMD128Update()
280 if ((context->count[0] += ((uint32_t) inputLen << 3)) < ((uint32_t) inputLen << 3)) { in PHP_RIPEMD128Update()
281 context->count[1]++; in PHP_RIPEMD128Update()
283 context->count[1] += ((uint32_t) inputLen >> 29); in PHP_RIPEMD128Update()
290 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); in PHP_RIPEMD128Update()
291 RIPEMD128Transform(context->state, context->buffer); in PHP_RIPEMD128Update()
294 RIPEMD128Transform(context->state, &input[i]); in PHP_RIPEMD128Update()
303 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], inputLen - i); in PHP_RIPEMD128Update()
370 PHP_HASH_API void PHP_RIPEMD256Update(PHP_RIPEMD256_CTX * context, const unsigned char *input, size… in PHP_RIPEMD256Update() argument
375 index = (unsigned int) ((context->count[0] >> 3) & 0x3F); in PHP_RIPEMD256Update()
378 if ((context->count[0] += ((uint32_t) inputLen << 3)) < ((uint32_t) inputLen << 3)) { in PHP_RIPEMD256Update()
379 context->count[1]++; in PHP_RIPEMD256Update()
381 context->count[1] += ((uint32_t) inputLen >> 29); in PHP_RIPEMD256Update()
388 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); in PHP_RIPEMD256Update()
389 RIPEMD256Transform(context->state, context->buffer); in PHP_RIPEMD256Update()
392 RIPEMD256Transform(context->state, &input[i]); in PHP_RIPEMD256Update()
401 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], inputLen - i); in PHP_RIPEMD256Update()
469 PHP_HASH_API void PHP_RIPEMD160Update(PHP_RIPEMD160_CTX * context, const unsigned char *input, size… in PHP_RIPEMD160Update() argument
474 index = (unsigned int) ((context->count[0] >> 3) & 0x3F); in PHP_RIPEMD160Update()
477 if ((context->count[0] += ((uint32_t) inputLen << 3)) < ((uint32_t) inputLen << 3)) { in PHP_RIPEMD160Update()
478 context->count[1]++; in PHP_RIPEMD160Update()
480 context->count[1] += ((uint32_t) inputLen >> 29); in PHP_RIPEMD160Update()
487 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); in PHP_RIPEMD160Update()
488 RIPEMD160Transform(context->state, context->buffer); in PHP_RIPEMD160Update()
491 RIPEMD160Transform(context->state, &input[i]); in PHP_RIPEMD160Update()
500 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], inputLen - i); in PHP_RIPEMD160Update()
577 PHP_HASH_API void PHP_RIPEMD320Update(PHP_RIPEMD320_CTX * context, const unsigned char *input, size… in PHP_RIPEMD320Update() argument
582 index = (unsigned int) ((context->count[0] >> 3) & 0x3F); in PHP_RIPEMD320Update()
585 if ((context->count[0] += ((uint32_t) inputLen << 3)) < ((uint32_t) inputLen << 3)) { in PHP_RIPEMD320Update()
586 context->count[1]++; in PHP_RIPEMD320Update()
588 context->count[1] += ((uint32_t) inputLen >> 29); in PHP_RIPEMD320Update()
595 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); in PHP_RIPEMD320Update()
596 RIPEMD320Transform(context->state, context->buffer); in PHP_RIPEMD320Update()
599 RIPEMD320Transform(context->state, &input[i]); in PHP_RIPEMD320Update()
608 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], inputLen - i); in PHP_RIPEMD320Update()
640 PHP_HASH_API void PHP_RIPEMD128Final(unsigned char digest[16], PHP_RIPEMD128_CTX * context) in PHP_RIPEMD128Final() argument
646 bits[0] = (unsigned char) (context->count[0] & 0xFF); in PHP_RIPEMD128Final()
647 bits[1] = (unsigned char) ((context->count[0] >> 8) & 0xFF); in PHP_RIPEMD128Final()
648 bits[2] = (unsigned char) ((context->count[0] >> 16) & 0xFF); in PHP_RIPEMD128Final()
649 bits[3] = (unsigned char) ((context->count[0] >> 24) & 0xFF); in PHP_RIPEMD128Final()
650 bits[4] = (unsigned char) (context->count[1] & 0xFF); in PHP_RIPEMD128Final()
651 bits[5] = (unsigned char) ((context->count[1] >> 8) & 0xFF); in PHP_RIPEMD128Final()
652 bits[6] = (unsigned char) ((context->count[1] >> 16) & 0xFF); in PHP_RIPEMD128Final()
653 bits[7] = (unsigned char) ((context->count[1] >> 24) & 0xFF); in PHP_RIPEMD128Final()
657 index = (unsigned int) ((context->count[0] >> 3) & 0x3f); in PHP_RIPEMD128Final()
659 PHP_RIPEMD128Update(context, PADDING, padLen); in PHP_RIPEMD128Final()
662 PHP_RIPEMD128Update(context, bits, 8); in PHP_RIPEMD128Final()
665 RIPEMDEncode(digest, context->state, 16); in PHP_RIPEMD128Final()
669 ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); in PHP_RIPEMD128Final()
677 PHP_HASH_API void PHP_RIPEMD256Final(unsigned char digest[32], PHP_RIPEMD256_CTX * context) in PHP_RIPEMD256Final() argument
683 bits[0] = (unsigned char) (context->count[0] & 0xFF); in PHP_RIPEMD256Final()
684 bits[1] = (unsigned char) ((context->count[0] >> 8) & 0xFF); in PHP_RIPEMD256Final()
685 bits[2] = (unsigned char) ((context->count[0] >> 16) & 0xFF); in PHP_RIPEMD256Final()
686 bits[3] = (unsigned char) ((context->count[0] >> 24) & 0xFF); in PHP_RIPEMD256Final()
687 bits[4] = (unsigned char) (context->count[1] & 0xFF); in PHP_RIPEMD256Final()
688 bits[5] = (unsigned char) ((context->count[1] >> 8) & 0xFF); in PHP_RIPEMD256Final()
689 bits[6] = (unsigned char) ((context->count[1] >> 16) & 0xFF); in PHP_RIPEMD256Final()
690 bits[7] = (unsigned char) ((context->count[1] >> 24) & 0xFF); in PHP_RIPEMD256Final()
694 index = (unsigned int) ((context->count[0] >> 3) & 0x3f); in PHP_RIPEMD256Final()
696 PHP_RIPEMD256Update(context, PADDING, padLen); in PHP_RIPEMD256Final()
699 PHP_RIPEMD256Update(context, bits, 8); in PHP_RIPEMD256Final()
702 RIPEMDEncode(digest, context->state, 32); in PHP_RIPEMD256Final()
706 ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); in PHP_RIPEMD256Final()
714 PHP_HASH_API void PHP_RIPEMD160Final(unsigned char digest[20], PHP_RIPEMD160_CTX * context) in PHP_RIPEMD160Final() argument
720 bits[0] = (unsigned char) (context->count[0] & 0xFF); in PHP_RIPEMD160Final()
721 bits[1] = (unsigned char) ((context->count[0] >> 8) & 0xFF); in PHP_RIPEMD160Final()
722 bits[2] = (unsigned char) ((context->count[0] >> 16) & 0xFF); in PHP_RIPEMD160Final()
723 bits[3] = (unsigned char) ((context->count[0] >> 24) & 0xFF); in PHP_RIPEMD160Final()
724 bits[4] = (unsigned char) (context->count[1] & 0xFF); in PHP_RIPEMD160Final()
725 bits[5] = (unsigned char) ((context->count[1] >> 8) & 0xFF); in PHP_RIPEMD160Final()
726 bits[6] = (unsigned char) ((context->count[1] >> 16) & 0xFF); in PHP_RIPEMD160Final()
727 bits[7] = (unsigned char) ((context->count[1] >> 24) & 0xFF); in PHP_RIPEMD160Final()
731 index = (unsigned int) ((context->count[0] >> 3) & 0x3f); in PHP_RIPEMD160Final()
733 PHP_RIPEMD160Update(context, PADDING, padLen); in PHP_RIPEMD160Final()
736 PHP_RIPEMD160Update(context, bits, 8); in PHP_RIPEMD160Final()
739 RIPEMDEncode(digest, context->state, 20); in PHP_RIPEMD160Final()
743 ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); in PHP_RIPEMD160Final()
751 PHP_HASH_API void PHP_RIPEMD320Final(unsigned char digest[40], PHP_RIPEMD320_CTX * context) in PHP_RIPEMD320Final() argument
757 bits[0] = (unsigned char) (context->count[0] & 0xFF); in PHP_RIPEMD320Final()
758 bits[1] = (unsigned char) ((context->count[0] >> 8) & 0xFF); in PHP_RIPEMD320Final()
759 bits[2] = (unsigned char) ((context->count[0] >> 16) & 0xFF); in PHP_RIPEMD320Final()
760 bits[3] = (unsigned char) ((context->count[0] >> 24) & 0xFF); in PHP_RIPEMD320Final()
761 bits[4] = (unsigned char) (context->count[1] & 0xFF); in PHP_RIPEMD320Final()
762 bits[5] = (unsigned char) ((context->count[1] >> 8) & 0xFF); in PHP_RIPEMD320Final()
763 bits[6] = (unsigned char) ((context->count[1] >> 16) & 0xFF); in PHP_RIPEMD320Final()
764 bits[7] = (unsigned char) ((context->count[1] >> 24) & 0xFF); in PHP_RIPEMD320Final()
768 index = (unsigned int) ((context->count[0] >> 3) & 0x3f); in PHP_RIPEMD320Final()
770 PHP_RIPEMD320Update(context, PADDING, padLen); in PHP_RIPEMD320Final()
773 PHP_RIPEMD320Update(context, bits, 8); in PHP_RIPEMD320Final()
776 RIPEMDEncode(digest, context->state, 40); in PHP_RIPEMD320Final()
780 ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); in PHP_RIPEMD320Final()