Make this usable both in kernel and userland.
This commit is contained in:
parent
ff5245dd05
commit
935cb376b9
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: rmd160.h,v 1.2 2005/04/19 14:05:53 blymn Exp $ */
|
/* $NetBSD: rmd160.h,v 1.3 2005/08/22 15:33:08 elad Exp $ */
|
||||||
/* $KAME: rmd160.h,v 1.2 2003/07/25 09:37:55 itojun Exp $ */
|
/* $KAME: rmd160.h,v 1.2 2003/07/25 09:37:55 itojun Exp $ */
|
||||||
/* $OpenBSD: rmd160.h,v 1.3 2002/03/14 01:26:51 millert Exp $ */
|
/* $OpenBSD: rmd160.h,v 1.3 2002/03/14 01:26:51 millert Exp $ */
|
||||||
/*
|
/*
|
||||||
|
@ -27,6 +27,9 @@
|
||||||
#ifndef _RMD160_H
|
#ifndef _RMD160_H
|
||||||
#define _RMD160_H
|
#define _RMD160_H
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
#define RMD160_DIGEST_LENGTH 20
|
#define RMD160_DIGEST_LENGTH 20
|
||||||
|
|
||||||
/* RMD160 context. */
|
/* RMD160 context. */
|
||||||
|
@ -36,9 +39,16 @@ typedef struct RMD160Context {
|
||||||
u_char buffer[64]; /* input buffer */
|
u_char buffer[64]; /* input buffer */
|
||||||
} RMD160_CTX;
|
} RMD160_CTX;
|
||||||
|
|
||||||
|
__BEGIN_DECLS
|
||||||
void RMD160Init(RMD160_CTX *);
|
void RMD160Init(RMD160_CTX *);
|
||||||
void RMD160Transform(u_int32_t [5], const u_char [64]);
|
void RMD160Transform(u_int32_t [5], const u_char [64]);
|
||||||
void RMD160Update(RMD160_CTX *, const u_char *, u_int32_t);
|
void RMD160Update(RMD160_CTX *, const u_char *, u_int32_t);
|
||||||
void RMD160Final(u_char [RMD160_DIGEST_LENGTH], RMD160_CTX *);
|
void RMD160Final(u_char [RMD160_DIGEST_LENGTH], RMD160_CTX *);
|
||||||
|
#ifndef _KERNEL
|
||||||
|
char *RMD160End(RMD160_CTX *, char *);
|
||||||
|
char *RMD160File(char *, char *);
|
||||||
|
char *RMD160Data(const u_char *, size_t, char *);
|
||||||
|
#endif /* _KERNEL */
|
||||||
|
__END_DECLS
|
||||||
|
|
||||||
#endif /* _RMD160_H */
|
#endif /* _RMD160_H */
|
||||||
|
|
Loading…
Reference in New Issue