Marco Zecchini
/
Example_RTOS
Rtos API example
Embed:
(wiki syntax)
Show/hide line numbers
md4.h
00001 /** 00002 * \file md4.h 00003 * 00004 * Based on XySSL: Copyright (C) 2006-2008 Christophe Devine 00005 * 00006 * Copyright (C) 2009 Paul Bakker <polarssl_maintainer at polarssl dot org> 00007 * 00008 * All rights reserved. 00009 * 00010 * Redistribution and use in source and binary forms, with or without 00011 * modification, are permitted provided that the following conditions 00012 * are met: 00013 * 00014 * * Redistributions of source code must retain the above copyright 00015 * notice, this list of conditions and the following disclaimer. 00016 * * Redistributions in binary form must reproduce the above copyright 00017 * notice, this list of conditions and the following disclaimer in the 00018 * documentation and/or other materials provided with the distribution. 00019 * * Neither the names of PolarSSL or XySSL nor the names of its contributors 00020 * may be used to endorse or promote products derived from this software 00021 * without specific prior written permission. 00022 * 00023 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00024 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00025 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 00026 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 00027 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00028 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 00029 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00030 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00031 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00032 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00033 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00034 */ 00035 00036 #include "netif/ppp/ppp_opts.h" 00037 #if LWIP_INCLUDED_POLARSSL_MD4 00038 00039 #ifndef LWIP_INCLUDED_POLARSSL_MD4_H 00040 #define LWIP_INCLUDED_POLARSSL_MD4_H 00041 00042 /** 00043 * \brief MD4 context structure 00044 */ 00045 typedef struct 00046 { 00047 unsigned long total[2]; /*!< number of bytes processed */ 00048 unsigned long state[4]; /*!< intermediate digest state */ 00049 unsigned char buffer[64]; /*!< data block being processed */ 00050 } 00051 md4_context; 00052 00053 #ifdef __cplusplus 00054 extern "C" { 00055 #endif 00056 00057 /** 00058 * \brief MD4 context setup 00059 * 00060 * \param ctx context to be initialized 00061 */ 00062 void md4_starts( md4_context *ctx ); 00063 00064 /** 00065 * \brief MD4 process buffer 00066 * 00067 * \param ctx MD4 context 00068 * \param input buffer holding the data 00069 * \param ilen length of the input data 00070 */ 00071 void md4_update( md4_context *ctx, const unsigned char *input, int ilen ); 00072 00073 /** 00074 * \brief MD4 final digest 00075 * 00076 * \param ctx MD4 context 00077 * \param output MD4 checksum result 00078 */ 00079 void md4_finish( md4_context *ctx, unsigned char output[16] ); 00080 00081 /** 00082 * \brief Output = MD4( input buffer ) 00083 * 00084 * \param input buffer holding the data 00085 * \param ilen length of the input data 00086 * \param output MD4 checksum result 00087 */ 00088 void md4( unsigned char *input, int ilen, unsigned char output[16] ); 00089 00090 00091 #ifdef __cplusplus 00092 } 00093 #endif 00094 00095 #endif /* LWIP_INCLUDED_POLARSSL_MD4_H */ 00096 00097 #endif /* LWIP_INCLUDED_POLARSSL_MD4 */
Generated on Sun Jul 17 2022 08:25:28 by 1.7.2