Changeset 742 in Sophya for trunk/SophyaLib/BaseTools/ppersist.h


Ignore:
Timestamp:
Feb 26, 2000, 10:24:54 AM (26 years ago)
Author:
ansari
Message:

new md5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BaseTools/ppersist.h

    r588 r742  
    1111#include "machdefs.h"
    1212#include "pexceptions.h"
    13 #include "md5.h"
     13#include "gnumd5.h"
     14
    1415
    1516#include <time.h>
     
    7273    static ClassCreatorFunc      FindCreatorFunc(uint_8 classId);
    7374    static uint_8 Hash(string const& typname) {
    74         MD5Init(&ctx);
    75         MD5Update(&ctx, (unsigned char*) typname.c_str(), typname.size());
    76         MD5Final(&ctx);
    77         return ( *((uint_8*) ctx.digest) + *((uint_8*) (ctx.digest+8)));
     75        md5_init(&ctx);
     76        md5_write(&ctx, (unsigned char*) typname.c_str(), typname.size());
     77        md5_final(&ctx);
     78        return ( *((uint_8*) ctx.buf) + *((uint_8*) (ctx.buf+8)));
    7879    }
    79     static MD5_CTX ctx;
     80    static MD5_CONTEXT ctx;
    8081 
    8182    static void Initialize();   // Pour initialiser classList
Note: See TracChangeset for help on using the changeset viewer.