Ruby
1.9.3p429(2013-05-15revision40747)
Main Page
Modules
Data Structures
Files
File List
Globals
ext
digest
rmd160
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_ */
57
Generated on Thu May 23 2013 20:33:01 for Ruby by
1.8.3