md5.h

Go to the documentation of this file.
00001 #ifndef _MD5_H_
00002 #define _MD5_H_
00003 
00004 /*
00005  * Copyright (C) 2009 by Thermotemp GmbH. All rights reserved.
00006  *
00007  * This code is based on a public domain implementation of md5.c by 
00008  * Colin Plumb, June 1993
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  * 1. Redistributions of source code must retain the above copyright
00015  *    notice, this list of conditions and the following disclaimer.
00016  * 2. 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  * 3. Neither the name of the copyright holders nor the names of
00020  *    contributors may be used to endorse or promote products derived
00021  *    from this software without specific prior written permission.
00022  *
00023  * THIS SOFTWARE IS PROVIDED BY THERMOTEMP GMBH 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 THERMOTEMP
00027  * GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
00028  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
00029  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00030  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
00031  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00032  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
00033  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00034  * SUCH DAMAGE.
00035  *
00036  * For additional information see http://www.ethernut.de/
00037  */
00038 
00043 
00044 #include <stdint.h>
00045 #include <sys/types.h>
00046 
00052 __BEGIN_DECLS
00053 
00058 typedef struct _MD5CONTEXT {
00059     uint32_t buf[4];
00060     uint32_t bits[2];
00061     uint8_t  in[64];
00062 } MD5CONTEXT;
00063 
00064 /* Function prototypes. */
00065 
00066 void NutMD5Init(MD5CONTEXT *context);
00067 void NutMD5Update(MD5CONTEXT *context, uint8_t CONST *buf, uint32_t len);
00068 void NutMD5Final(MD5CONTEXT *context, uint8_t digest[16]);
00069 
00070 __END_DECLS
00071 
00074 #endif

© 2000-2010 by contributors - visit http://www.ethernut.de/