Ruby 2.0.0p353(2013-11-22revision43784)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

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: rmd160.h 27437 2010-04-22 08:04:13Z nobu $ */
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
45 __BEGIN_DECLS
46 void 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 void RMD160_Finish _((RMD160_CTX *, uint8_t[20]));
50 __END_DECLS
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_ */
RMD160_CTX::buflen
uint32_t buflen
Definition: rmd160.h:35
defs.h
state
int state
Definition: tcltklib.c:1462
uint8_t
unsigned char uint8_t
Definition: sha2.h:100
RMD160_Finish
void RMD160_Finish(RMD160_CTX *context, uint8_t digest[20])
Definition: rmd160.c:416
__BEGIN_DECLS
#define __BEGIN_DECLS
Definition: defs.h:15
RMD160_Transform
void RMD160_Transform(uint32_t state[5], const uint32_t block[16])
Definition: rmd160.c:146
RMD160_CTX
#define RMD160_CTX
Definition: rmd160ossl.h:9
length
size_t length
Definition: tcltklib.c:4559
RMD160_Update
void RMD160_Update(RMD160_CTX *context, const uint8_t *data, size_t nbytes)
Definition: rmd160.c:352
_
#define _(args)
Definition: dln.h:28
uint32_t
unsigned int uint32_t
Definition: sha2.h:101
RMD160_Init
void RMD160_Init(RMD160_CTX *context)
Definition: rmd160.c:128
RMD160_CTX
Definition: rmd160.h:31
__END_DECLS
#define __END_DECLS
Definition: defs.h:16