📄 crc32.cpp
字号:
/** * @file crc32.cpp * @brief 字符串的包装,crc32校验 * @author 泥偶 * @since 2003-09-27 * @date 2003-09-27 */#include "xstring.hpp"namespace x{ namespace { #include "crc32.c" }//---------------------------------------------------------------------------- /** 生成字符串循环冗余校验多项式的和。这通常用来在数据传输过程中验证数据的有效 性。 @code * xstring str = "The quick brown fox jumped over the lazy dog."; * unsigned int checksum = str.crc32(); * cout << checksum; // 输出 2191738434 @endcode @see md5() sha1() */ unsigned int xstring::crc32(void) const { return x::crc32(0, this->data(), this->size()); }} // namespace x
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -