00001 00007 /* 00008 * Copyright (c) 2000, 2001, 2002 Virtual Unlimited B.V. 00009 * 00010 * Author: Bob Deblier <bob@virtualunlimited.com> 00011 * 00012 * This library is free software; you can redistribute it and/or 00013 * modify it under the terms of the GNU Lesser General Public 00014 * License as published by the Free Software Foundation; either 00015 * version 2.1 of the License, or (at your option) any later version. 00016 * 00017 * This library is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00020 * Lesser General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU Lesser General Public 00023 * License along with this library; if not, write to the Free Software 00024 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00025 * 00026 */ 00027 00028 #ifndef _HMACMD5_H 00029 #define _HMACMD5_H 00030 00031 #include "hmac.h" 00032 #include "md5.h" 00033 00036 typedef struct 00037 { 00038 hmacParam hparam; 00039 md5Param mparam; 00040 } hmacmd5Param; 00041 00042 #ifdef __cplusplus 00043 extern "C" { 00044 #endif 00045 00048 /*@observer@*/ /*@checked@*/ 00049 extern BEECRYPTAPI const keyedHashFunction hmacmd5; 00050 00053 /*@-exportlocal@*/ 00054 BEECRYPTAPI 00055 int hmacmd5Setup (hmacmd5Param* sp, const uint32* key, int keybits) 00056 /*@globals md5 @*/ 00057 /*@modifies sp @*/; 00058 /*@=exportlocal@*/ 00059 00062 /*@-exportlocal@*/ 00063 BEECRYPTAPI 00064 int hmacmd5Reset (hmacmd5Param* sp) 00065 /*@globals md5 @*/ 00066 /*@modifies sp @*/; 00067 /*@=exportlocal@*/ 00068 00071 /*@-exportlocal@*/ 00072 BEECRYPTAPI 00073 int hmacmd5Update(hmacmd5Param* sp, const byte* data, int size) 00074 /*@globals md5 @*/ 00075 /*@modifies sp @*/; 00076 /*@=exportlocal@*/ 00077 00080 /*@-exportlocal@*/ 00081 BEECRYPTAPI 00082 int hmacmd5Digest(hmacmd5Param* sp, uint32* data) 00083 /*@globals md5 @*/ 00084 /*@modifies sp, data @*/; 00085 /*@=exportlocal@*/ 00086 00087 #ifdef __cplusplus 00088 } 00089 #endif 00090 00091 #endif