0.0.1版本

This commit is contained in:
2026-06-16 18:30:19 +08:00
parent f10504e4a1
commit 128226e57f
84 changed files with 5571 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
#ifndef SHA1_H
#define SHA1_H
#include <cstdint>
#include <vector>
class SHA1 {
public:
static const size_t HASH_SIZE = 20;
static const size_t BLOCK_SIZE = 64;
SHA1();
void update(const uint8_t* data, size_t length);
void finalize(uint8_t* hash);
private:
void transform(const uint8_t* block);
uint32_t state[5];
uint8_t buffer[64];
uint64_t count;
};
#endif // SHA1_H