Annotation of sbbs/src/smblib/md5.h, revision 1.1.1.2

1.1       root        1: /* md5.h - header file for md5.c */
                      2: 
1.1.1.2 ! root        3: /* $Id: md5.h,v 1.6 2007/08/12 19:24:08 deuce Exp $ */
1.1       root        4: 
                      5: /* RSA Data Security, Inc., MD5 Message-Digest Algorithm */
                      6: 
                      7: /* NOTE: Numerous changes have been made; the following notice is
                      8: included to satisfy legal requirements.
                      9: 
                     10: Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
                     11: rights reserved.
                     12: 
                     13: License to copy and use this software is granted provided that it
                     14: is identified as the "RSA Data Security, Inc. MD5 Message-Digest
                     15: Algorithm" in all material mentioning or referencing this software
                     16: or this function.
                     17: 
                     18: License is also granted to make and use derivative works provided
                     19: that such works are identified as "derived from the RSA Data
                     20: Security, Inc. MD5 Message-Digest Algorithm" in all material
                     21: mentioning or referencing the derived work.
                     22: 
                     23: RSA Data Security, Inc. makes no representations concerning either
                     24: the merchantability of this software or the suitability of this
                     25: software for any particular purpose. It is provided "as is"
                     26: without express or implied warranty of any kind.
                     27: 
                     28: These notices must be retained in any copies of any part of this
                     29: documentation and/or software.
                     30: */
                     31: 
                     32: #ifndef H__MD5
                     33: #define H__MD5
                     34: 
                     35: #include <stddef.h>            /* size_t */
1.1.1.2 ! root       36: #include <gen_defs.h>  /* uint32_t */
1.1       root       37: 
                     38: #define MD5_DIGEST_SIZE                16
                     39: 
                     40: #ifndef BYTE
                     41:        typedef unsigned char BYTE;
                     42: #endif
                     43: 
                     44: typedef struct
                     45: {
1.1.1.2 ! root       46:   uint32_t     state[4];
        !            47:   uint32_t     count[2];
1.1       root       48:   BYTE buffer[64];
                     49: } MD5;
                     50: 
                     51: #if defined(_WIN32) && (defined(MD5_IMPORTS) || defined(MD5_EXPORTS))
                     52:        #if defined(MD5_IMPORTS)
                     53:                #define MD5EXPORT       __declspec(dllimport)
                     54:        #else
                     55:                #define MD5EXPORT       __declspec(dllexport)
                     56:        #endif
                     57:        #if defined(__BORLANDC__)
                     58:                #define MD5CALL __stdcall
                     59:        #else
                     60:                #define MD5CALL
                     61:        #endif
                     62: #else  /* !_WIN32 */
                     63:        #define MD5EXPORT
                     64:        #define MD5CALL
                     65: #endif
                     66: 
                     67: 
                     68: #ifdef __cplusplus
                     69: extern "C" {
                     70: #endif
                     71: 
                     72: MD5EXPORT void MD5CALL MD5_open(MD5* ctx);
                     73: MD5EXPORT void MD5CALL MD5_digest(MD5* ctx, const void* buf, size_t len);
                     74: MD5EXPORT void MD5CALL MD5_close(MD5* ctx, BYTE digest[MD5_DIGEST_SIZE]);
                     75: MD5EXPORT BYTE*        MD5CALL MD5_calc(BYTE digest[MD5_DIGEST_SIZE], const void* buf, size_t len);
                     76: MD5EXPORT BYTE*        MD5CALL MD5_hex(BYTE* dest, const BYTE digest[MD5_DIGEST_SIZE]);
                     77: 
                     78: #ifdef __cplusplus
                     79: }
                     80: #endif
                     81: 
                     82: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.