1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- #ifndef _RCRAD_MD5_H
- #define _RCRAD_MD5_H
- #include "radius_config.h"
- #ifdef HAVE_NETTLE
- #include <nettle/md5-compat.h>
- #else
- #ifdef HAVE_INTTYPES_H
- #include <inttypes.h>
- #endif
- #ifdef HAVE_SYS_TYPES_H
- #include <sys/types.h>
- #endif
- #ifdef HAVE_STDINT_H
- #include <stdint.h>
- #endif
- #include <string.h>
- #define MD5_CTX librad_MD5_CTX
- #define MD5Init librad_MD5Init
- #define MD5Update librad_MD5Update
- #define MD5Final librad_MD5Final
- #define MD5Transform librad_MD5Transform
- #define MD5_BLOCK_LENGTH 64
- #define MD5_DIGEST_LENGTH 16
- typedef struct MD5Context {
- uint32_t state[4];
- uint32_t count[2];
- uint8_t buffer[MD5_BLOCK_LENGTH];
- } MD5_CTX;
- void MD5Init(MD5_CTX *);
- void MD5Update(MD5_CTX *, uint8_t const *, size_t)
- ;
- void MD5Final(uint8_t [MD5_DIGEST_LENGTH], MD5_CTX *)
- ;
- void MD5Transform(uint32_t [4], uint8_t const [MD5_BLOCK_LENGTH])
- ;
- #endif
- #endif
|