1104476Ssam/*	$FreeBSD$	*/
2104476Ssam/*	$OpenBSD: rmd160.h,v 1.3 2002/03/14 01:26:51 millert Exp $	*/
3139825Simp/*-
4104476Ssam * Copyright (c) 2001 Markus Friedl.  All rights reserved.
5104476Ssam *
6104476Ssam * Redistribution and use in source and binary forms, with or without
7104476Ssam * modification, are permitted provided that the following conditions
8104476Ssam * are met:
9104476Ssam * 1. Redistributions of source code must retain the above copyright
10104476Ssam *    notice, this list of conditions and the following disclaimer.
11104476Ssam * 2. Redistributions in binary form must reproduce the above copyright
12104476Ssam *    notice, this list of conditions and the following disclaimer in the
13104476Ssam *    documentation and/or other materials provided with the distribution.
14104476Ssam *
15104476Ssam * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16104476Ssam * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17104476Ssam * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18104476Ssam * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19104476Ssam * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20104476Ssam * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21104476Ssam * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22104476Ssam * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23104476Ssam * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24104476Ssam * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25104476Ssam */
26104476Ssam#ifndef  _RMD160_H
27104476Ssam#define  _RMD160_H
28104476Ssam
29104476Ssam/* RMD160 context. */
30104476Ssamtypedef struct RMD160Context {
31104476Ssam	u_int32_t state[5];	/* state */
32104476Ssam	u_int64_t count;	/* number of bits, modulo 2^64 */
33104476Ssam	u_char buffer[64];	/* input buffer */
34104476Ssam} RMD160_CTX;
35104476Ssam
36104476Ssamvoid	 RMD160Init(RMD160_CTX *);
37104476Ssamvoid	 RMD160Transform(u_int32_t [5], const u_char [64]);
38104476Ssamvoid	 RMD160Update(RMD160_CTX *, const u_char *, u_int32_t);
39104476Ssamvoid	 RMD160Final(u_char [20], RMD160_CTX *);
40104476Ssam
41104476Ssam#endif  /* _RMD160_H */
42