chksum.h

Go to the documentation of this file.
00001 #include "pool.h"
00002 
00003 void *sat_chksum_create(Id type);
00004 void *sat_chksum_create_from_bin(Id type, const unsigned char *buf);
00005 void sat_chksum_add(void *handle, const void *data, int len);
00006 Id sat_chksum_get_type(void *handle);
00007 int sat_chksum_isfinished(void *handle);
00008 const unsigned char *sat_chksum_get(void *handle, int *lenp);
00009 void *sat_chksum_free(void *handle, unsigned char *cp);
00010 const char *sat_chksum_type2str(Id type);
00011 Id sat_chksum_str2type(const char *str);
00012 
00013 static inline int sat_chksum_len(Id type)
00014 {
00015   switch (type)
00016     {
00017     case REPOKEY_TYPE_MD5:
00018       return 16;
00019     case REPOKEY_TYPE_SHA1:
00020       return 20;
00021     case REPOKEY_TYPE_SHA256:
00022       return 32;
00023     default:
00024       return 0;
00025     }
00026 }

Generated on Mon Dec 15 17:56:24 2014 for satsolver by  doxygen 1.5.6