A Port of TI's Webserver for the CC3000
Embed:
(wiki syntax)
Show/hide line numbers
md5.h
00001 /* 00002 * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc. 00003 * MD5 Message-Digest Algorithm (RFC 1321). 00004 * 00005 * Homepage: 00006 * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 00007 * 00008 * Author: 00009 * Alexander Peslyak, better known as Solar Designer <solar at openwall.com> 00010 * 00011 * This software was written by Alexander Peslyak in 2001. No copyright is 00012 * claimed, and the software is hereby placed in the public domain. 00013 * In case this attempt to disclaim copyright and place the software in the 00014 * public domain is deemed null and void, then the software is 00015 * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the 00016 * general public under the following terms: 00017 * 00018 * Redistribution and use in source and binary forms, with or without 00019 * modification, are permitted. 00020 * 00021 * There's ABSOLUTELY NO WARRANTY, express or implied. 00022 * 00023 * See md5.c for more information. 00024 */ 00025 00026 //***************************************************************************** 00027 // 00028 // If building with a C++ compiler, make all of the definitions in this header 00029 // have a C binding. 00030 // 00031 //***************************************************************************** 00032 #ifdef __cplusplus 00033 extern "C" { 00034 #endif 00035 00036 #ifdef HAVE_OPENSSL 00037 #include <openssl/md5.h> 00038 #elif !defined(_MD5_H) 00039 #define _MD5_H 00040 00041 /* Any 32-bit or wider unsigned integer data type will do */ 00042 typedef unsigned long MD5_u32plus; 00043 00044 //#ifdef __CCS__ 00045 //typedef struct __attribute__ ((__packed__)) 00046 //#elif __IAR_SYSTEMS_ICC__ 00047 //#pragma pack(1) 00048 typedef struct 00049 //#endif 00050 { 00051 MD5_u32plus lo, hi; 00052 MD5_u32plus a, b, c, d; 00053 unsigned char buffer[64]; 00054 MD5_u32plus block[16]; 00055 } MD5_CTX; 00056 00057 extern void MD5_Init(MD5_CTX *ctx); 00058 extern void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size); 00059 extern void MD5_Final(unsigned char *result, MD5_CTX *ctx); 00060 00061 //***************************************************************************** 00062 // 00063 // Mark the end of the C bindings section for C++ compilers. 00064 // 00065 //***************************************************************************** 00066 #ifdef __cplusplus 00067 } 00068 #endif // __cplusplus 00069 00070 #endif 00071
Generated on Wed Jul 13 2022 13:30:51 by
1.7.2