diff options
author | Erwin Hoffmann <feh@fehcom.de> | 2024-01-14 17:55:54 +0100 |
---|---|---|
committer | Erwin Hoffmann <feh@fehcom.de> | 2024-01-14 17:55:54 +0100 |
commit | a293489ee83c8b05d845a162dc2a4de026f3775d (patch) | |
tree | d50ab15afde698ad2d32bfc251753e5e89204f25 /sqmail-4.3.07/src/include/sha256.h |
s/qmail 4.3.07
Diffstat (limited to 'sqmail-4.3.07/src/include/sha256.h')
-rw-r--r-- | sqmail-4.3.07/src/include/sha256.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sqmail-4.3.07/src/include/sha256.h b/sqmail-4.3.07/src/include/sha256.h new file mode 100644 index 0000000..e8979c5 --- /dev/null +++ b/sqmail-4.3.07/src/include/sha256.h @@ -0,0 +1,18 @@ +#ifndef SHA256_H +#define SHA256_H + +typedef struct +{ + uint8_t data[64]; + uint32_t datalen; + uint32_t bitlen[2]; + uint32_t state[8]; +} sha256_ctx; + +static void sha256_init(sha256_ctx *ctx); +static void sha256_transform(sha256_ctx *ctx, uint8_t *data); +static void sha256_update(sha256_ctx *ctx, uint8_t *data, uint32_t len); +static void sha256_final(uint8_t *hash, sha256_ctx *ctx); +extern void sha256_hash(char *hash,const char *data, size_t len); + +#endif |