ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
sha1.h
Go to the documentation of this file.
1/* $OpenBSD: sha1.h,v 1.6 2014/11/16 17:39:09 tedu Exp $ */
2/*
3 * SHA-1 in C
4 * By Steve Reid <steve@edmweb.com>
5 * 100% Public Domain
6 *
7 * Ported to use standard C types for portability
8 */
9
10#ifndef _SHA1_H_
11#define _SHA1_H_
12
13#include <stdint.h>
14#include <string.h>
15
16#define SHA1_BLOCK_LENGTH 64
17#define SHA1_DIGEST_LENGTH 20
18
19typedef struct {
20 uint32_t state[5];
22 unsigned char buffer[SHA1_BLOCK_LENGTH];
23} SHA1_CTX;
24
25void SHA1Init(SHA1_CTX *context);
26void SHA1Transform(uint32_t state[5], const unsigned char buffer[SHA1_BLOCK_LENGTH]);
27void SHA1Update(SHA1_CTX *context, const void *data, unsigned int len);
28void SHA1Final(unsigned char digest[SHA1_DIGEST_LENGTH], SHA1_CTX *context);
29
30#endif /* _SHA1_H_ */
unsigned int uint32_t
Definition common.h:58
unsigned long long uint64_t
Definition common.h:59
#define SHA1_BLOCK_LENGTH
Definition sha1.h:16
void SHA1Init(SHA1_CTX *context)
Definition sha1.c:186
#define SHA1_DIGEST_LENGTH
Definition sha1.h:17
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 void *data, unsigned int len)
Definition sha1.c:198
uint64_t count
Definition sha1.h:21