This repository has been archived on 2024-11-01. You can view files and clone it, but cannot push or open issues or pull requests.
make_ext4fs_old/sha1.h
Imre Kaloz 7c15bef6c7 avoid using libc's internal sys/cdefs.h
sha1.h simply shouldn't use it while sha1.c simply doesn't

Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
2015-05-01 18:13:00 +02:00

36 lines
668 B
C

/* $NetBSD: sha1.h,v 1.13 2005/12/26 18:41:36 perry Exp $ */
/*
* SHA-1 in C
* By Steve Reid <steve@edmweb.com>
* 100% Public Domain
*/
#ifndef _SYS_SHA1_H_
#define _SYS_SHA1_H_
#include <sys/types.h>
#include <stdint.h>
#define SHA1_DIGEST_LENGTH 20
#define SHA1_DIGEST_STRING_LENGTH 41
typedef struct {
uint32_t state[5];
uint32_t count[2];
u_char buffer[64];
} SHA1_CTX;
#ifdef __cplusplus
extern "C" {
#endif
void SHA1Transform(uint32_t[5], const u_char[64]);
void SHA1Init(SHA1_CTX *);
void SHA1Update(SHA1_CTX *, const u_char *, u_int);
void SHA1Final(u_char[SHA1_DIGEST_LENGTH], SHA1_CTX *);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_SHA1_H_ */