Lines Matching refs:context
23 PHP_HASH_API void PHP_CRC32Init(PHP_CRC32_CTX *context, ZEND_ATTRIBUTE_UNUSED HashTable *args) in PHP_CRC32Init() argument
25 context->state = ~0; in PHP_CRC32Init()
28 PHP_HASH_API void PHP_CRC32Update(PHP_CRC32_CTX *context, const unsigned char *input, size_t len) in PHP_CRC32Update() argument
33 i += crc32_x86_simd_update(X86_CRC32, &context->state, input, len); in PHP_CRC32Update()
37 context->state = (context->state << 8) ^ crc32_table[(context->state >> 24) ^ (input[i] & 0xff)]; in PHP_CRC32Update()
41 PHP_HASH_API void PHP_CRC32BUpdate(PHP_CRC32_CTX *context, const unsigned char *input, size_t len) in PHP_CRC32BUpdate() argument
46 i += crc32_x86_simd_update(X86_CRC32B, &context->state, input, len); in PHP_CRC32BUpdate()
50 context->state = (context->state >> 8) ^ crc32b_table[(context->state ^ input[i]) & 0xff]; in PHP_CRC32BUpdate()
54 PHP_HASH_API void PHP_CRC32CUpdate(PHP_CRC32_CTX *context, const unsigned char *input, size_t len) in PHP_CRC32CUpdate() argument
59 i += crc32_x86_simd_update(X86_CRC32C, &context->state, input, len); in PHP_CRC32CUpdate()
63 context->state = (context->state >> 8) ^ crc32c_table[(context->state ^ input[i]) & 0xff]; in PHP_CRC32CUpdate()
67 PHP_HASH_API void PHP_CRC32LEFinal(unsigned char digest[4], PHP_CRC32_CTX *context) in PHP_CRC32LEFinal() argument
69 context->state=~context->state; in PHP_CRC32LEFinal()
70 digest[3] = (unsigned char) ((context->state >> 24) & 0xff); in PHP_CRC32LEFinal()
71 digest[2] = (unsigned char) ((context->state >> 16) & 0xff); in PHP_CRC32LEFinal()
72 digest[1] = (unsigned char) ((context->state >> 8) & 0xff); in PHP_CRC32LEFinal()
73 digest[0] = (unsigned char) (context->state & 0xff); in PHP_CRC32LEFinal()
74 context->state = 0; in PHP_CRC32LEFinal()
77 PHP_HASH_API void PHP_CRC32BEFinal(unsigned char digest[4], PHP_CRC32_CTX *context) in PHP_CRC32BEFinal() argument
79 context->state=~context->state; in PHP_CRC32BEFinal()
80 digest[0] = (unsigned char) ((context->state >> 24) & 0xff); in PHP_CRC32BEFinal()
81 digest[1] = (unsigned char) ((context->state >> 16) & 0xff); in PHP_CRC32BEFinal()
82 digest[2] = (unsigned char) ((context->state >> 8) & 0xff); in PHP_CRC32BEFinal()
83 digest[3] = (unsigned char) (context->state & 0xff); in PHP_CRC32BEFinal()
84 context->state = 0; in PHP_CRC32BEFinal()