"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "include/mx/cred-md5.h" between
s-nail-14.9.18.tar.xz and s-nail-14.9.19.tar.xz

About: S-nail is a mail processing system intended to provide the functionality of the POSIX mailx command and offers extensions for line editing, IDNA, MIME, S/MIME, SMTP and POP3 (and IMAP). It is usable as a mail batch language.

cred-md5.h  (s-nail-14.9.18.tar.xz):cred-md5.h  (s-nail-14.9.19.tar.xz)
skipping to change at line 46 skipping to change at line 46
without express or implied warranty of any kind. without express or implied warranty of any kind.
These notices must be retained in any copies of any part of this These notices must be retained in any copies of any part of this
documentation and/or software. documentation and/or software.
*/ */
#ifndef mx_CRED_MD5_H #ifndef mx_CRED_MD5_H
#define mx_CRED_MD5_H #define mx_CRED_MD5_H
#include <mx/nail.h> #include <mx/nail.h>
#ifdef mx_HAVE_MD5 #ifdef mx_HAVE_MD5
#ifdef mx_HAVE_XTLS_MD5 #ifdef mx_XTLS_HAVE_MD5
# include <openssl/md5.h> # include <openssl/md5.h>
#endif #endif
#define mx_HEADER #define mx_HEADER
#include <su/code-in.h> #include <su/code-in.h>
/* */ /* */
#define mx_MD5_DIGEST_SIZE 16u #define mx_MD5_DIGEST_SIZE 16u
/* */ /* */
#define mx_MD5_TOHEX_SIZE 32u #define mx_MD5_TOHEX_SIZE 32u
/* MD5 (RFC 1321) related facilities */ /* MD5 (RFC 1321) related facilities */
#ifdef mx_HAVE_XTLS_MD5 #ifdef mx_XTLS_HAVE_MD5
# define mx_md5_t MD5_CTX # define mx_md5_t MD5_CTX
# define mx_md5_init MD5_Init # define mx_md5_init MD5_Init
# define mx_md5_update MD5_Update # define mx_md5_update MD5_Update
# define mx_md5_final MD5_Final # define mx_md5_final MD5_Final
#else #else
/* RFC 1321, MD5.H: */ /* RFC 1321, MD5.H: */
/* /*
* This version of MD5 has been changed such that any unsigned type with * This version of MD5 has been changed such that any unsigned type with
* at least 32 bits is acceptable. This is important e.g. for Cray vector * at least 32 bits is acceptable. This is important e.g. for Cray vector
* machines which provide only 64-bit integers. * machines which provide only 64-bit integers.
skipping to change at line 83 skipping to change at line 83
typedef struct{ typedef struct{
mx_md5_type state[4]; /* state (ABCD) */ mx_md5_type state[4]; /* state (ABCD) */
mx_md5_type count[2]; /* number of bits, modulo 2^64 (lsb first) */ mx_md5_type count[2]; /* number of bits, modulo 2^64 (lsb first) */
unsigned char buffer[64]; /* input buffer */ unsigned char buffer[64]; /* input buffer */
} mx_md5_t; } mx_md5_t;
EXPORT void mx_md5_init(mx_md5_t *); EXPORT void mx_md5_init(mx_md5_t *);
EXPORT void mx_md5_update(mx_md5_t *, unsigned char *, unsigned int); EXPORT void mx_md5_update(mx_md5_t *, unsigned char *, unsigned int);
EXPORT void mx_md5_final(unsigned char[mx_MD5_DIGEST_SIZE], mx_md5_t *); EXPORT void mx_md5_final(unsigned char[mx_MD5_DIGEST_SIZE], mx_md5_t *);
#endif /* mx_HAVE_XTLS_MD5 */ #endif /* mx_XTLS_HAVE_MD5 */
/* Store the MD5 checksum as a hexadecimal string in *hex*, *not* terminated, /* Store the MD5 checksum as a hexadecimal string in *hex*, *not* terminated,
* using lowercase ASCII letters as defined in RFC 2195 */ * using lowercase ASCII letters as defined in RFC 2195 */
EXPORT char *mx_md5_tohex(char hex[mx_MD5_TOHEX_SIZE], void const *vp); EXPORT char *mx_md5_tohex(char hex[mx_MD5_TOHEX_SIZE], void const *vp);
/* CRAM-MD5 encode the *user* / *pass* / *b64* combo; NULL on overflow error */ /* CRAM-MD5 encode the *user* / *pass* / *b64* combo; NULL on overflow error */
EXPORT char *mx_md5_cram_string(struct str const *user, struct str const *pass, EXPORT char *mx_md5_cram_string(struct str const *user, struct str const *pass,
char const *b64); char const *b64);
/* RFC 2104: HMAC: Keyed-Hashing for Message Authentication. /* RFC 2104: HMAC: Keyed-Hashing for Message Authentication.
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)