145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org/* See md5.c for explanation and copyright information. */ 245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#ifndef YASM_MD5_H 445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#define YASM_MD5_H 545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#ifndef YASM_LIB_DECL 745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#define YASM_LIB_DECL 845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#endif 945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 1045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org/* Unlike previous versions of this code, uint32 need not be exactly 1145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 32 bits, merely 32 bits or more. Choosing a data type which is 32 1245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org bits instead of 64 is not important; speed is considerably more 1345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org important. ANSI guarantees that "unsigned long" will be big enough, 1445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org and always using it seems to have few disadvantages. */ 1545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 1645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgtypedef struct yasm_md5_context { 1745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org unsigned long buf[4]; 1845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org unsigned long bits[2]; 1945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org unsigned char in[64]; 2045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org} yasm_md5_context; 2145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 2245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgYASM_LIB_DECL 2345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgvoid yasm_md5_init(yasm_md5_context *context); 2445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgYASM_LIB_DECL 2545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgvoid yasm_md5_update(yasm_md5_context *context, unsigned char const *buf, 2645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org unsigned long len); 2745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgYASM_LIB_DECL 2845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgvoid yasm_md5_final(unsigned char digest[16], yasm_md5_context *context); 2945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgYASM_LIB_DECL 3045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgvoid yasm_md5_transform(unsigned long buf[4], const unsigned char in[64]); 3145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 3245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#endif /* !YASM_MD5_H */ 33