diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-07-17 05:37:02 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-07-17 05:37:02 +0000 |
commit | cecd47c9e738eefe3b930ff905b9a9b501d40ef9 (patch) | |
tree | 536ed47d2d793a4869fdc86cecd3688ed28d03ce /include/rmd160.h | |
parent | 24794a0328b7f04fcc7b08f52c0d99bc66218cd9 (diff) |
mdX(3)-like interface to RIPEMD-160 hash function. Code by
Antoon Bosselaers and massaged by me to fit the mdX(3) API.
Diffstat (limited to 'include/rmd160.h')
-rw-r--r-- | include/rmd160.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/include/rmd160.h b/include/rmd160.h new file mode 100644 index 00000000000..0f3bd8166b3 --- /dev/null +++ b/include/rmd160.h @@ -0,0 +1,45 @@ +/********************************************************************\ + * + * FILE: rmd160.h + * + * CONTENTS: Header file for a sample C-implementation of the + * RIPEMD-160 hash-function. + * TARGET: any computer with an ANSI C compiler + * + * AUTHOR: Antoon Bosselaers, ESAT-COSIC + * DATE: 1 March 1996 + * VERSION: 1.0 + * + * Copyright (c) Katholieke Universiteit Leuven + * 1996, All Rights Reserved + * +\********************************************************************/ + +#ifndef _RMD160_H /* make sure this file is read only once */ +#define _RMD160_H + +/********************************************************************/ + +/* structure definitions */ + +typedef struct { + u_int32_t state[5]; /* state (ABCDE) */ + u_int32_t length[2]; /* number of bits */ + u_int32_t buffer[16]; /* input buffer */ +} RMD160_CTX; + +/********************************************************************/ + +/* function prototypes */ + +void RMD160Init __P((RMD160_CTX *context)); +void RMD160Transform __P((u_int32_t state[5], const u_int32_t block[16])); +void RMD160Update __P((RMD160_CTX *context, const u_char *data, u_int nbytes)); +void RMD160Final __P((u_char digest[20], RMD160_CTX *context)); +char *RMD160End __P((RMD160_CTX *, char *)); +char *RMD160File __P((char *, char *)); +char *RMD160Data __P((const u_char *, size_t, char *)); + +#endif /* _RMD160_H */ + +/*********************** end of file rmd160.h ***********************/ |