| 1 |
/* $NetBSD: rmd160.h,v 1.5 2008/10/06 12:36:20 joerg Exp $ */ |
| 2 |
|
| 3 |
/********************************************************************\ |
| 4 |
* |
| 5 |
* FILE: rmd160.h |
| 6 |
* |
| 7 |
* CONTENTS: Header file for a sample C-implementation of the |
| 8 |
* RIPEMD-160 hash-function. |
| 9 |
* TARGET: any computer with an ANSI C compiler |
| 10 |
* |
| 11 |
* AUTHOR: Antoon Bosselaers, ESAT-COSIC |
| 12 |
* DATE: 1 March 1996 |
| 13 |
* VERSION: 1.0 |
| 14 |
* |
| 15 |
* Copyright (c) Katholieke Universiteit Leuven |
| 16 |
* 1996, All Rights Reserved |
| 17 |
* |
| 18 |
\********************************************************************/ |
| 19 |
|
| 20 |
/* |
| 21 |
* from OpenBSD: rmd160.h,v 1.4 1999/08/16 09:59:04 millert Exp |
| 22 |
*/ |
| 23 |
|
| 24 |
#ifndef _NBCOMPAT_RMD160_H_ |
| 25 |
#define _NBCOMPAT_RMD160_H_ |
| 26 |
|
| 27 |
#define RMD160_DIGEST_LENGTH 20 |
| 28 |
#define RMD160_DIGEST_STRING_LENGTH 41 |
| 29 |
|
| 30 |
typedef struct { |
| 31 |
uint32_t state[5]; /* state (ABCDE) */ |
| 32 |
uint32_t length[2]; /* number of bits */ |
| 33 |
unsigned char bbuffer[64]; /* overflow buffer */ |
| 34 |
uint32_t buflen; /* number of chars in bbuffer */ |
| 35 |
} RMD160_CTX; |
| 36 |
|
| 37 |
__BEGIN_DECLS |
| 38 |
void RMD160Init(RMD160_CTX *); |
| 39 |
void RMD160Transform(uint32_t[5], const uint32_t[16]); |
| 40 |
void RMD160Update(RMD160_CTX *, const unsigned char *, uint32_t); |
| 41 |
void RMD160Final(unsigned char[20], RMD160_CTX *); |
| 42 |
char *RMD160End(RMD160_CTX *, char *); |
| 43 |
char *RMD160File(char *, char *); |
| 44 |
char *RMD160Data(const unsigned char *, size_t, char *); |
| 45 |
__END_DECLS |
| 46 |
|
| 47 |
#endif /* !_NBCOMPAT_RMD160_H_ */ |