home *** CD-ROM | disk | FTP | other *** search
/ ftp.shrubbery.net / 2015-02-07.ftp.shrubbery.net.tar / ftp.shrubbery.net / pub / tac_plus / tacacs+-F4.0.4.27a.tar.gz / tacacs+-F4.0.4.27a.tar / tacacs+-F4.0.4.27a / md5.h < prev    next >
C/C++ Source or Header  |  2012-03-27  |  3KB  |  75 lines

  1. /*
  2.  * Copyright (c) 1995-1998 by Cisco systems, Inc.
  3.  *
  4.  * Permission to use, copy, modify, and distribute this software for
  5.  * any purpose and without fee is hereby granted, provided that this
  6.  * copyright and permission notice appear on all copies of the
  7.  * software and supporting documentation, the name of Cisco Systems,
  8.  * Inc. not be used in advertising or publicity pertaining to
  9.  * distribution of the program without specific prior permission, and
  10.  * notice be given in supporting documentation that modification,
  11.  * copying and distribution is by permission of Cisco Systems, Inc.
  12.  *
  13.  * Cisco Systems, Inc. makes no representations about the suitability
  14.  * of this software for any purpose.  THIS SOFTWARE IS PROVIDED ``AS
  15.  * IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
  16.  * WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  17.  * FITNESS FOR A PARTICULAR PURPOSE.
  18.  */
  19.  
  20.  
  21. /*
  22.  * md5.h - header file for MD5C.C
  23.  * $Id: md5.h,v 1.6 2005-04-25 02:23:42 heas Exp $
  24.  */
  25.  
  26. /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
  27.  * rights reserved.
  28.  *
  29.  * License to copy and use this software is granted provided that it
  30.  * is identified as the "RSA Data Security, Inc. MD5 Message-Digest
  31.  * Algorithm" in all material mentioning or referencing this software
  32.  * or this function.
  33.  *
  34.  * License is also granted to make and use derivative works provided
  35.  * that such works are identified as "derived from the RSA Data
  36.  * Security, Inc. MD5 Message-Digest Algorithm" in all material
  37.  * mentioning or referencing the derived work.
  38.  *
  39.  * RSA Data Security, Inc. makes no representations concerning either
  40.  * the merchantability of this software or the suitability of this
  41.  * software for any particular purpose. It is provided "as is"
  42.  * without express or implied warranty of any kind.
  43.  *
  44.  * These notices must be retained in any copies of any part of this
  45.  * documentation and/or software.
  46.  */
  47.  
  48. #ifndef _MD5_H
  49. #define _MD5_H
  50.  
  51. #ifdef HAVE_SYS_TYPES_H
  52. # include <sys/types.h>
  53. #endif
  54. #ifdef HAVE_STDINT_H
  55. # include <stdint.h>
  56. #endif
  57.  
  58. #define MD5_SIZE    16
  59.  
  60. /* typedef a generic pointer type */
  61. typedef unsigned char *POINTER;
  62.  
  63. /* MD5 context. */
  64. typedef struct {
  65.   uint32_t state[4];        /* state (ABCD) */
  66.   uint32_t count[2];        /* number of bits, modulo 2^64 (lsb first) */
  67.   unsigned char buffer[64];    /* input buffer */
  68. } MD5_CTX;
  69.  
  70. void MD5Final(unsigned char [], MD5_CTX *);
  71. void MD5Init(MD5_CTX *);
  72. void MD5Update(MD5_CTX *, unsigned char *, unsigned int);
  73.  
  74. #endif                          /* _MD5_H */
  75.