1 /* 2 * md5-apps.h 3 * 4 * This file is part of msmtp, an SMTP client. 5 * 6 * This code was adapted from GNU Anubis, version 3.6.2 7 * Copyright (C) 2001, 2002 The Anubis Team. 8 * 9 * This program is free software; you can redistribute it and/or modify 10 * it under the terms of the GNU General Public License as published by 11 * the Free Software Foundation; either version 2 of the License, or 12 * (at your option) any later version. 13 * 14 * This program is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU General Public License for more details. 18 * 19 * You should have received a copy of the GNU General Public License 20 * along with this program; if not, write to the Free Software 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 */ 23 24 #ifndef MD5_APPS_H 25 #define MD5_APPS_H 26 27 #include <stddef.h> 28 29 /* 30 * md5_hmac() -- RFC 2104 31 * 32 * Writes MD5 digest of 'secret', 'challenge' to 'digest', which must be 33 * 16 unsigned chars long. 'secret' and 'challenge' must not be NULL! 34 */ 35 void md5_hmac(const char *secret, size_t secret_len, 36 char *challenge, size_t challenge_len, 37 unsigned char *digest); 38 39 /* 40 * md5_digest() 41 * 42 * Writes the MD5 Digest of the data 'src' with the length 'srclen' in ascii 43 * (hex) to 'dst', which must be 33 characters long. 44 */ 45 void md5_digest(unsigned char *src, size_t srclen, char *dst); 46 47 #endif 48