]> git.ipfire.org Git - thirdparty/git.git/blame - ppc/sha1.h
t4034: abstract away SHA-1-specific constants
[thirdparty/git.git] / ppc / sha1.h
CommitLineData
a6ef3518
PM
1/*
2 * SHA-1 implementation.
3 *
4 * Copyright (C) 2005 Paul Mackerras <paulus@samba.org>
5 */
6#include <stdint.h>
7
9126f009 8typedef struct {
a6ef3518
PM
9 uint32_t hash[5];
10 uint32_t cnt;
11 uint64_t len;
12 union {
13 unsigned char b[64];
14 uint64_t l[8];
15 } buf;
9126f009 16} ppc_SHA_CTX;
a6ef3518 17
9126f009
NP
18int ppc_SHA1_Init(ppc_SHA_CTX *c);
19int ppc_SHA1_Update(ppc_SHA_CTX *c, const void *p, unsigned long n);
20int ppc_SHA1_Final(unsigned char *hash, ppc_SHA_CTX *c);
21
3bc72fde
APD
22#define platform_SHA_CTX ppc_SHA_CTX
23#define platform_SHA1_Init ppc_SHA1_Init
24#define platform_SHA1_Update ppc_SHA1_Update
25#define platform_SHA1_Final ppc_SHA1_Final