[IRC-Dev CVS] [CVS] Module ircd-ircdev: Change committed
Brought to you by:
zolty
From: Toni G. <zo...@us...> - 2004-11-24 16:10:42
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2004-11-24 16:10:11 UTC Added files: include/ircd_md5.h Log message: Author: zoltan <zo...@ir...> Log message: 2004-11-24 Toni García <zo...@ir...> 1.0.alpha13 * Comentarios para Doxygen * Excepciones de Silences * Soporte total de IPv6 * Sincronizacion Undernet ---------------------- diff included ---------------------- Index: ircd-ircdev/include/ircd_md5.h diff -u /dev/null ircd-ircdev/include/ircd_md5.h:1.1 --- /dev/null Wed Nov 24 08:10:28 2004 +++ ircd-ircdev/include/ircd_md5.h Wed Nov 24 08:10:01 2004 @@ -0,0 +1,62 @@ +/* + * IRC-Dev IRCD - An advanced and innovative IRC Daemon, include/ircd_md5.h + * + * Copyright (C) 2002-2004 IRC-Dev Development Team <de...@ir...> + * Copyright (C) 2002 hikari + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +/* + * This code implements the MD5 message-digest algorithm. + * The algorithm is due to Ron Rivest. This code was + * written by Colin Plumb in 1993, no copyright is claimed. + * This code is in the public domain; do with it what you wish. + * + * Equivalent code is available from RSA Data Security, Inc. + * This code has been tested against that, and is equivalent, + * except that you don't need to include two pages of legalese + * with every copy. + * + * ircuified 2002 by hikari + */ +/** @file + * @brief MD5 implementation for ircu. + * @version $Id: ircd_md5.h,v 1.1 2004/11/24 16:10:01 zolty Exp $ + */ +#ifndef ircd_md5_h +#define ircd_md5_h + +/** Typedef for an unsigned 32-bit integer. */ +typedef unsigned int uint32; + +/** MD5 context structure. */ +struct MD5Context { + uint32 buf[4]; /**< Current digest state/value. */ + uint32 bits[2]; /**< Number of bits hashed so far. */ + unsigned char in[64]; /**< Residual input buffer. */ +}; + +void MD5Init(struct MD5Context *); +void MD5Update(struct MD5Context *, unsigned const char *, unsigned); +void MD5Final(unsigned char digest[16], struct MD5Context *); +void MD5Transform(uint32 buf[4], uint32 const in[16]); + +char *crypt_md5(const char *pw, const char *salt); + +/** Helper typedef for the MD5 context structure. */ +typedef struct MD5Context MD5_CTX; + +#endif /* ircd_md5_h */ ----------------------- End of diff ----------------------- |