用C++实现MD5算法,定义了一个MD5类,用户可以直接调用方法生成字符串的md5校验值
2023-12-16 08:00:59 3KB MD5
1
MD5 算法是用来进行数字签名和算法。能将任意长的字符串生产128位长的等长字符。
2023-12-10 08:03:15 4KB MD5
1
看到一个不错的c++实现的md5算法 class MD5 { public: typedef unsigned int size_type; // must be 32bit MD5(); MD5(const std::string& text); void update(const unsigned char *buf, size_type length); void update(const char *buf, size_type length); MD5& finalize(); std::string hexdigest() const; friend std::ostream& operator<<(std::ostream&, MD5 md5); private: void init(); typedef unsigned char uint1; // 8bit typedef unsigned int uint4; // 32bit enum {blocksize = 64}; // VC6 won't eat a const static int here void transform(const uint1 block[blocksize]); static void decode(uint4 output[], const uint1 input[], size_type len); static void encode(uint1 output[], const uint4 input[], size_type len); bool finalized; uint1 buffer[blocksize]; // bytes that didn't fit in last 64 byte chunk uint4 count[2]; // 64bit counter for number of bits (lo, hi) uint4 state[4]; // digest so far uint1 digest[16]; // the result // low level logic operations static inline uint4 F(uint4 x, uint4 y, uint4 z); static inline uint4 G(uint4 x, uint4 y, uint4 z); static inline uint4 H(uint4 x, uint4 y, uint4 z); static inline uint4 I(uint4 x, uint4 y, uint4 z); static inline uint4 rotate_left(uint4 x, int n); static inline void FF(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac); static inline void GG(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac); static inline void HH(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac); static inline void II(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac); }; std::string md5(const std::string &str);
2023-12-06 08:01:50 5KB md5
1
一个用于快速计算md5的类,因为php的md5_file的效率不敢恭维,所以自己写了一个计算的工具,可以反复多次、增量式的计算md5,对于大文件,自己在外面处理每次要读多少文件内容,然后调用本工具类进行处理就可以了.
2023-12-04 09:03:54 15KB md5 快速md5
1
C#编写的文件校验码查看器,将文件拖入窗口即可计算,校验算法包括MD5、SHA1、SHA256、SHA384、SHA512、CRC32。
2023-11-30 05:04:18 89KB
1
void CalcMd5(const char* input, uint32_t length); void CalcMd5(const unsigned char* input, uint32_t length);
2023-11-22 08:05:44 4KB MD5
1
C++的HMAC_SHA1加密算法源码,你自己可以做成动态库,由VC、VB或者C#调用。 C++的HMAC_SHA1加密算法源码,你自己可以做成动态库,由VC、VB或者C#调用。
2023-10-30 23:28:12 6KB C++ MD5加密 HMAC SHA1
1
MD5加密 AS3版,MD5消息摘要算法(英语:MD5 Message-Digest Algorithm),一种被广泛使用的密码散列函数,可以产生出一个128位(16字节)的散列值(hash value),用于确保信息传输完整一致。MD5由美国密码学家罗纳德·李维斯特(Ronald Linn Rivest)设计,于1992年公开,用以取代MD4算法。
2023-09-30 12:42:19 6KB MD5 加密 AS3
1
使用PyQt5开发的md5加密器
2023-09-27 17:59:49 34.97MB md5 pyqt python
1