Source code pulled from OpenBSD for OpenNTPD. The place to contribute to this code is via the OpenBSD CVS tree.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.6 KiB

  1. /* $OpenBSD: rmd160.h,v 1.3 1998/03/23 12:49:28 janjaap Exp $ */
  2. /********************************************************************\
  3. *
  4. * FILE: rmd160.h
  5. *
  6. * CONTENTS: Header file for a sample C-implementation of the
  7. * RIPEMD-160 hash-function.
  8. * TARGET: any computer with an ANSI C compiler
  9. *
  10. * AUTHOR: Antoon Bosselaers, ESAT-COSIC
  11. * DATE: 1 March 1996
  12. * VERSION: 1.0
  13. *
  14. * Copyright (c) Katholieke Universiteit Leuven
  15. * 1996, All Rights Reserved
  16. *
  17. \********************************************************************/
  18. #ifndef _RMD160_H /* make sure this file is read only once */
  19. #define _RMD160_H
  20. /********************************************************************/
  21. /* structure definitions */
  22. typedef struct {
  23. u_int32_t state[5]; /* state (ABCDE) */
  24. u_int32_t length[2]; /* number of bits */
  25. u_char bbuffer[64]; /* overflow buffer */
  26. u_int32_t buflen; /* number of chars in bbuffer */
  27. } RMD160_CTX;
  28. /********************************************************************/
  29. /* function prototypes */
  30. void RMD160Init __P((RMD160_CTX *context));
  31. void RMD160Transform __P((u_int32_t state[5], const u_int32_t block[16]));
  32. void RMD160Update __P((RMD160_CTX *context, const u_char *data, u_int nbytes));
  33. void RMD160Final __P((u_char digest[20], RMD160_CTX *context));
  34. char *RMD160End __P((RMD160_CTX *, char *));
  35. char *RMD160File __P((char *, char *));
  36. char *RMD160Data __P((const u_char *, size_t, char *));
  37. #endif /* _RMD160_H */
  38. /*********************** end of file rmd160.h ***********************/