Lines Matching refs:context
87 PHP_HASH_API void PHP_RIPEMD128Init(PHP_RIPEMD128_CTX * context, ZEND_ATTRIBUTE_UNUSED HashTable *a… 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, ZEND_ATTRIBUTE_UNUSED HashTable *a… 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, ZEND_ATTRIBUTE_UNUSED HashTable *a… 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, ZEND_ATTRIBUTE_UNUSED HashTable *a… 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
278 index = (unsigned int) ((context->count[0] >> 3) & 0x3F); in PHP_RIPEMD128Update()
281 if ((context->count[0] += ((uint32_t) inputLen << 3)) < ((uint32_t) inputLen << 3)) { in PHP_RIPEMD128Update()
282 context->count[1]++; in PHP_RIPEMD128Update()
284 context->count[1] += (uint32_t) (inputLen >> 29); in PHP_RIPEMD128Update()
291 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); in PHP_RIPEMD128Update()
292 RIPEMD128Transform(context->state, context->buffer); in PHP_RIPEMD128Update()
295 RIPEMD128Transform(context->state, &input[i]); in PHP_RIPEMD128Update()
304 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], inputLen - i); in PHP_RIPEMD128Update()
371 PHP_HASH_API void PHP_RIPEMD256Update(PHP_RIPEMD256_CTX * context, const unsigned char *input, size… in PHP_RIPEMD256Update() argument
377 index = (unsigned int) ((context->count[0] >> 3) & 0x3F); in PHP_RIPEMD256Update()
380 if ((context->count[0] += ((uint32_t) inputLen << 3)) < ((uint32_t) inputLen << 3)) { in PHP_RIPEMD256Update()
381 context->count[1]++; in PHP_RIPEMD256Update()
383 context->count[1] += (uint32_t) (inputLen >> 29); in PHP_RIPEMD256Update()
390 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); in PHP_RIPEMD256Update()
391 RIPEMD256Transform(context->state, context->buffer); in PHP_RIPEMD256Update()
394 RIPEMD256Transform(context->state, &input[i]); in PHP_RIPEMD256Update()
403 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], inputLen - i); in PHP_RIPEMD256Update()
471 PHP_HASH_API void PHP_RIPEMD160Update(PHP_RIPEMD160_CTX * context, const unsigned char *input, size… in PHP_RIPEMD160Update() argument
477 index = (unsigned int) ((context->count[0] >> 3) & 0x3F); in PHP_RIPEMD160Update()
480 if ((context->count[0] += ((uint32_t) inputLen << 3)) < ((uint32_t) inputLen << 3)) { in PHP_RIPEMD160Update()
481 context->count[1]++; in PHP_RIPEMD160Update()
483 context->count[1] += (uint32_t) (inputLen >> 29); in PHP_RIPEMD160Update()
490 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); in PHP_RIPEMD160Update()
491 RIPEMD160Transform(context->state, context->buffer); in PHP_RIPEMD160Update()
494 RIPEMD160Transform(context->state, &input[i]); in PHP_RIPEMD160Update()
503 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], inputLen - i); in PHP_RIPEMD160Update()
580 PHP_HASH_API void PHP_RIPEMD320Update(PHP_RIPEMD320_CTX * context, const unsigned char *input, size… in PHP_RIPEMD320Update() argument
586 index = (unsigned int) ((context->count[0] >> 3) & 0x3F); in PHP_RIPEMD320Update()
589 if ((context->count[0] += ((uint32_t) inputLen << 3)) < ((uint32_t) inputLen << 3)) { in PHP_RIPEMD320Update()
590 context->count[1]++; in PHP_RIPEMD320Update()
592 context->count[1] += (uint32_t) (inputLen >> 29); in PHP_RIPEMD320Update()
599 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); in PHP_RIPEMD320Update()
600 RIPEMD320Transform(context->state, context->buffer); in PHP_RIPEMD320Update()
603 RIPEMD320Transform(context->state, &input[i]); in PHP_RIPEMD320Update()
612 memcpy((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], inputLen - i); in PHP_RIPEMD320Update()
644 PHP_HASH_API void PHP_RIPEMD128Final(unsigned char digest[16], PHP_RIPEMD128_CTX * context) in PHP_RIPEMD128Final() argument
650 bits[0] = (unsigned char) (context->count[0] & 0xFF); in PHP_RIPEMD128Final()
651 bits[1] = (unsigned char) ((context->count[0] >> 8) & 0xFF); in PHP_RIPEMD128Final()
652 bits[2] = (unsigned char) ((context->count[0] >> 16) & 0xFF); in PHP_RIPEMD128Final()
653 bits[3] = (unsigned char) ((context->count[0] >> 24) & 0xFF); in PHP_RIPEMD128Final()
654 bits[4] = (unsigned char) (context->count[1] & 0xFF); in PHP_RIPEMD128Final()
655 bits[5] = (unsigned char) ((context->count[1] >> 8) & 0xFF); in PHP_RIPEMD128Final()
656 bits[6] = (unsigned char) ((context->count[1] >> 16) & 0xFF); in PHP_RIPEMD128Final()
657 bits[7] = (unsigned char) ((context->count[1] >> 24) & 0xFF); in PHP_RIPEMD128Final()
661 index = (unsigned int) ((context->count[0] >> 3) & 0x3f); in PHP_RIPEMD128Final()
663 PHP_RIPEMD128Update(context, PADDING, padLen); in PHP_RIPEMD128Final()
666 PHP_RIPEMD128Update(context, bits, 8); in PHP_RIPEMD128Final()
669 RIPEMDEncode(digest, context->state, 16); in PHP_RIPEMD128Final()
673 ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); in PHP_RIPEMD128Final()
681 PHP_HASH_API void PHP_RIPEMD256Final(unsigned char digest[32], PHP_RIPEMD256_CTX * context) in PHP_RIPEMD256Final() argument
687 bits[0] = (unsigned char) (context->count[0] & 0xFF); in PHP_RIPEMD256Final()
688 bits[1] = (unsigned char) ((context->count[0] >> 8) & 0xFF); in PHP_RIPEMD256Final()
689 bits[2] = (unsigned char) ((context->count[0] >> 16) & 0xFF); in PHP_RIPEMD256Final()
690 bits[3] = (unsigned char) ((context->count[0] >> 24) & 0xFF); in PHP_RIPEMD256Final()
691 bits[4] = (unsigned char) (context->count[1] & 0xFF); in PHP_RIPEMD256Final()
692 bits[5] = (unsigned char) ((context->count[1] >> 8) & 0xFF); in PHP_RIPEMD256Final()
693 bits[6] = (unsigned char) ((context->count[1] >> 16) & 0xFF); in PHP_RIPEMD256Final()
694 bits[7] = (unsigned char) ((context->count[1] >> 24) & 0xFF); in PHP_RIPEMD256Final()
698 index = (unsigned int) ((context->count[0] >> 3) & 0x3f); in PHP_RIPEMD256Final()
700 PHP_RIPEMD256Update(context, PADDING, padLen); in PHP_RIPEMD256Final()
703 PHP_RIPEMD256Update(context, bits, 8); in PHP_RIPEMD256Final()
706 RIPEMDEncode(digest, context->state, 32); in PHP_RIPEMD256Final()
710 ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); in PHP_RIPEMD256Final()
718 PHP_HASH_API void PHP_RIPEMD160Final(unsigned char digest[20], PHP_RIPEMD160_CTX * context) in PHP_RIPEMD160Final() argument
724 bits[0] = (unsigned char) (context->count[0] & 0xFF); in PHP_RIPEMD160Final()
725 bits[1] = (unsigned char) ((context->count[0] >> 8) & 0xFF); in PHP_RIPEMD160Final()
726 bits[2] = (unsigned char) ((context->count[0] >> 16) & 0xFF); in PHP_RIPEMD160Final()
727 bits[3] = (unsigned char) ((context->count[0] >> 24) & 0xFF); in PHP_RIPEMD160Final()
728 bits[4] = (unsigned char) (context->count[1] & 0xFF); in PHP_RIPEMD160Final()
729 bits[5] = (unsigned char) ((context->count[1] >> 8) & 0xFF); in PHP_RIPEMD160Final()
730 bits[6] = (unsigned char) ((context->count[1] >> 16) & 0xFF); in PHP_RIPEMD160Final()
731 bits[7] = (unsigned char) ((context->count[1] >> 24) & 0xFF); in PHP_RIPEMD160Final()
735 index = (unsigned int) ((context->count[0] >> 3) & 0x3f); in PHP_RIPEMD160Final()
737 PHP_RIPEMD160Update(context, PADDING, padLen); in PHP_RIPEMD160Final()
740 PHP_RIPEMD160Update(context, bits, 8); in PHP_RIPEMD160Final()
743 RIPEMDEncode(digest, context->state, 20); in PHP_RIPEMD160Final()
747 ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); in PHP_RIPEMD160Final()
755 PHP_HASH_API void PHP_RIPEMD320Final(unsigned char digest[40], PHP_RIPEMD320_CTX * context) in PHP_RIPEMD320Final() argument
761 bits[0] = (unsigned char) (context->count[0] & 0xFF); in PHP_RIPEMD320Final()
762 bits[1] = (unsigned char) ((context->count[0] >> 8) & 0xFF); in PHP_RIPEMD320Final()
763 bits[2] = (unsigned char) ((context->count[0] >> 16) & 0xFF); in PHP_RIPEMD320Final()
764 bits[3] = (unsigned char) ((context->count[0] >> 24) & 0xFF); in PHP_RIPEMD320Final()
765 bits[4] = (unsigned char) (context->count[1] & 0xFF); in PHP_RIPEMD320Final()
766 bits[5] = (unsigned char) ((context->count[1] >> 8) & 0xFF); in PHP_RIPEMD320Final()
767 bits[6] = (unsigned char) ((context->count[1] >> 16) & 0xFF); in PHP_RIPEMD320Final()
768 bits[7] = (unsigned char) ((context->count[1] >> 24) & 0xFF); in PHP_RIPEMD320Final()
772 index = (unsigned int) ((context->count[0] >> 3) & 0x3f); in PHP_RIPEMD320Final()
774 PHP_RIPEMD320Update(context, PADDING, padLen); in PHP_RIPEMD320Final()
777 PHP_RIPEMD320Update(context, bits, 8); in PHP_RIPEMD320Final()
780 RIPEMDEncode(digest, context->state, 40); in PHP_RIPEMD320Final()
784 ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); in PHP_RIPEMD320Final()