ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
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#ifdef __cplusplus
17extern "C" {
18#endif
19
20#define SHA1_BLOCK_LENGTH 64
21#define SHA1_DIGEST_LENGTH 20
22
23typedef struct {
26 unsigned char buffer[SHA1_BLOCK_LENGTH];
33} SHA1_CTX;
34
35void SHA1Init(SHA1_CTX *context);
36void SHA1Transform(uint32_t state[5], const unsigned char *buffer);
37void SHA1Update(SHA1_CTX *context, const void *data, unsigned int len);
38void SHA1Final(unsigned char digest[SHA1_DIGEST_LENGTH], SHA1_CTX *context);
39
40#endif /* _SHA1_H_ */
41
42#ifdef __cplusplus
43}
44#endif
unsigned int uint32_t
unsigned long long uint64_t
#define SHA1_BLOCK_LENGTH
Definition sha1.h:20
void SHA1Init(SHA1_CTX *context)
Definition sha1.c:200
#define SHA1_DIGEST_LENGTH
Definition sha1.h:21
void SHA1Transform(uint32_t state[5], const unsigned char *buffer)
Definition sha1.c:84
void SHA1Final(unsigned char digest[20], SHA1_CTX *context)
Definition sha1.c:233
void SHA1Update(SHA1_CTX *context, const void *data, unsigned int len)
Definition sha1.c:212
🔤 String Manipulation and Shell Escaping Utilities
uint64_t count
Definition sha1.h:25
uint32_t state[5]
Definition sha1.h:24
unsigned char buffer[64]
Definition sha1.h:26