Ruby  2.5.0dev(2017-10-22revision60238)
rmd160.h
Go to the documentation of this file.
1 /* $NetBSD: rmd160.h,v 1.2 2000/07/07 10:47:06 ad Exp $ */
2 /* $RoughId: rmd160.h,v 1.3 2002/02/24 08:14:31 knu Exp $ */
3 /* $Id$ */
4 
5 /********************************************************************\
6  *
7  * FILE: rmd160.h
8  *
9  * CONTENTS: Header file for a sample C-implementation of the
10  * RIPEMD-160 hash-function.
11  * TARGET: any computer with an ANSI C compiler
12  *
13  * AUTHOR: Antoon Bosselaers, ESAT-COSIC
14  * DATE: 1 March 1996
15  * VERSION: 1.0
16  *
17  * Copyright (c) Katholieke Universiteit Leuven
18  * 1996, All Rights Reserved
19  *
20 \********************************************************************/
21 
22 /*
23  * from OpenBSD: rmd160.h,v 1.4 1999/08/16 09:59:04 millert Exp
24  */
25 
26 #ifndef _RMD160_H_
27 #define _RMD160_H_
28 
29 #include "../defs.h"
30 
31 typedef struct {
32  uint32_t state[5]; /* state (ABCDE) */
33  uint32_t length[2]; /* number of bits */
34  uint8_t bbuffer[64]; /* overflow buffer */
35  uint32_t buflen; /* number of chars in bbuffer */
36 } RMD160_CTX;
37 
38 #ifdef RUBY
39 #define RMD160_Init rb_Digest_RMD160_Init
40 #define RMD160_Transform rb_Digest_RMD160_Transform
41 #define RMD160_Update rb_Digest_RMD160_Update
42 #define RMD160_Finish rb_Digest_RMD160_Finish
43 #endif
44 
46 int RMD160_Init _((RMD160_CTX *));
47 void RMD160_Transform _((uint32_t[5], const uint32_t[16]));
48 void RMD160_Update _((RMD160_CTX *, const uint8_t *, size_t));
49 int RMD160_Finish _((RMD160_CTX *, uint8_t[20]));
51 
52 #define RMD160_BLOCK_LENGTH 64
53 #define RMD160_DIGEST_LENGTH 20
54 #define RMD160_DIGEST_STRING_LENGTH (RMD160_DIGEST_LENGTH * 2 + 1)
55 
56 #endif /* !_RMD160_H_ */
__BEGIN_DECLS int RMD160_Init _((RMD160_CTX *))
uint32_t buflen
Definition: rmd160.h:35
unsigned char uint8_t
Definition: sha2.h:100
#define __BEGIN_DECLS
Definition: defs.h:15
#define RMD160_Update
Definition: rmd160.h:41
#define RMD160_CTX
Definition: rmd160ossl.h:9
unsigned int uint32_t
Definition: sha2.h:101
#define RMD160_Finish
Definition: rmd160.h:42
#define RMD160_Init
Definition: rmd160.h:39
#define RMD160_Transform
Definition: rmd160.h:40
#define __END_DECLS
Definition: defs.h:16