Concord - C Discord API library
A Discord API wrapper library written in C
sha1.h
Go to the documentation of this file.
1#ifndef SHA1_H
2#define SHA1_H
3
4/*
5 SHA-1 in C
6 By Steve Reid <steve@edmweb.com>
7 100% Public Domain
8 */
9
10#include "stdint.h"
11
12typedef struct
13{
14 uint32_t state[5];
15 uint32_t count[2];
16 unsigned char buffer[64];
17} SHA1_CTX;
18
20 uint32_t state[5],
21 const unsigned char buffer[64]
22 );
23
25 SHA1_CTX * context
26 );
27
29 SHA1_CTX * context,
30 const unsigned char *data,
31 uint32_t len
32 );
33
35 unsigned char digest[20],
36 SHA1_CTX * context
37 );
38
39void SHA1(
40 char *hash_out,
41 const char *str,
42 int len);
43
44#endif /* SHA1_H */
void SHA1Init(SHA1_CTX *context)
void SHA1(char *hash_out, const char *str, int len)
void SHA1Transform(uint32_t state[5], const unsigned char buffer[64])
void SHA1Final(unsigned char digest[20], SHA1_CTX *context)
void SHA1Update(SHA1_CTX *context, const unsigned char *data, uint32_t len)
Definition: sha1.h:13