Lines Matching refs:context
26 PHP_HASH_API void PHP_CRC32Init(PHP_CRC32_CTX *context) in PHP_CRC32Init() argument
28 context->state = ~0; in PHP_CRC32Init()
31 PHP_HASH_API void PHP_CRC32Update(PHP_CRC32_CTX *context, const unsigned char *input, size_t len) in PHP_CRC32Update() argument
36 context->state = (context->state << 8) ^ crc32_table[(context->state >> 24) ^ (input[i] & 0xff)]; in PHP_CRC32Update()
40 PHP_HASH_API void PHP_CRC32BUpdate(PHP_CRC32_CTX *context, const unsigned char *input, size_t len) in PHP_CRC32BUpdate() argument
45 context->state = (context->state >> 8) ^ crc32b_table[(context->state ^ input[i]) & 0xff]; in PHP_CRC32BUpdate()
49 PHP_HASH_API void PHP_CRC32Final(unsigned char digest[4], PHP_CRC32_CTX *context) in PHP_CRC32Final() argument
51 context->state=~context->state; in PHP_CRC32Final()
52 digest[3] = (unsigned char) ((context->state >> 24) & 0xff); in PHP_CRC32Final()
53 digest[2] = (unsigned char) ((context->state >> 16) & 0xff); in PHP_CRC32Final()
54 digest[1] = (unsigned char) ((context->state >> 8) & 0xff); in PHP_CRC32Final()
55 digest[0] = (unsigned char) (context->state & 0xff); in PHP_CRC32Final()
56 context->state = 0; in PHP_CRC32Final()
59 PHP_HASH_API void PHP_CRC32BFinal(unsigned char digest[4], PHP_CRC32_CTX *context) in PHP_CRC32BFinal() argument
61 context->state=~context->state; in PHP_CRC32BFinal()
62 digest[0] = (unsigned char) ((context->state >> 24) & 0xff); in PHP_CRC32BFinal()
63 digest[1] = (unsigned char) ((context->state >> 16) & 0xff); in PHP_CRC32BFinal()
64 digest[2] = (unsigned char) ((context->state >> 8) & 0xff); in PHP_CRC32BFinal()
65 digest[3] = (unsigned char) (context->state & 0xff); in PHP_CRC32BFinal()
66 context->state = 0; in PHP_CRC32BFinal()