Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
git/ppc/sha1.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
25 lines (22 sloc)
579 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* SHA-1 implementation. | |
* | |
* Copyright (C) 2005 Paul Mackerras <paulus@samba.org> | |
*/ | |
#include <stdint.h> | |
typedef struct { | |
uint32_t hash[5]; | |
uint32_t cnt; | |
uint64_t len; | |
union { | |
unsigned char b[64]; | |
uint64_t l[8]; | |
} buf; | |
} ppc_SHA_CTX; | |
int ppc_SHA1_Init(ppc_SHA_CTX *c); | |
int ppc_SHA1_Update(ppc_SHA_CTX *c, const void *p, unsigned long n); | |
int ppc_SHA1_Final(unsigned char *hash, ppc_SHA_CTX *c); | |
#define platform_SHA_CTX ppc_SHA_CTX | |
#define platform_SHA1_Init ppc_SHA1_Init | |
#define platform_SHA1_Update ppc_SHA1_Update | |
#define platform_SHA1_Final ppc_SHA1_Final |