"Fossies" - the Fresh Open Source Software Archive

Member "msmtp-1.8.5/src/md5-apps.h" (11 Jun 2018, 1492 Bytes) of package /linux/privat/msmtp-1.8.5.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "md5-apps.h" see the Fossies "Dox" file reference documentation.

    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 /*
   28  * md5_hmac() -- RFC 2104
   29  *
   30  * Writes MD5 digest of 'secret', 'challenge' to 'digest', which must be
   31  * 16 unsigned chars long. 'secret' and 'challenge' must not be NULL!
   32  */
   33 void md5_hmac(const char *secret, size_t secret_len,
   34         char *challenge, size_t challenge_len,
   35         unsigned char *digest);
   36 
   37 /*
   38  * md5_digest()
   39  *
   40  * Writes the MD5 Digest of the data 'src' with the length 'srclen' in ascii
   41  * (hex) to 'dst', which must be 33 characters long.
   42  */
   43 void md5_digest(unsigned char *src, size_t srclen, char *dst);
   44 
   45 #endif