⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 crc32.h

📁 CRC校验采用多项式编码方法。多项式乘除法运算过程与普通代数多项式的乘除法相同。多项式的加减法运算以2为模
💻 H
字号:
#ifndef CRC32_INCLUDED#  define CRC32_INCLUDED#include "defs.h"/* * This code has some adaptations for the Ghostscript environment, but it * will compile and run correctly in any environment with 8-bit chars and * 32-bit ints.  Specifically, it assumes that if the following are * defined, they have the same meaning as in Ghostscript: P1, P2, P3. *//* Define the state of the CRC32 Algorithm. */typedef struct crc32_state_s {    uint32_t count[2];	/* message length in bits, lsw first */    uint32_t state[1];	/* digest buffer */} CRC32_CTX;#ifdef RUBY#define CRC32_Init	rb_Digest_CRC32_Init#define CRC32_Update	rb_Digest_CRC32_Update#define CRC32_Final	rb_Digest_CRC32_Final#define CRC32_End		rb_Digest_CRC32_End#define CRC32_Equal	rb_Digest_CRC32_Equal#endifvoid	CRC32_Init _((CRC32_CTX *pms));void	CRC32_Update _((CRC32_CTX *pms, const uint8_t *data, size_t nbytes));void	CRC32_Final _((uint8_t *digest, CRC32_CTX *pms));void	CRC32_End _((CRC32_CTX *pctx, uint8_t *hexdigest));int	CRC32_Equal _((CRC32_CTX *pctx1, CRC32_CTX *pctx2));#define CRC32_BLOCK_LENGTH		1#define CRC32_DIGEST_LENGTH		4#define CRC32_DIGEST_STRING_LENGTH	(CRC32_DIGEST_LENGTH * 2 + 1)#endif /* CRC32_INCLUDED */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -