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_add(void *handle, const void *data, int len);
00005 unsigned char *sat_chksum_get(void *handle, int *lenp);
00006 void *sat_chksum_free(void *handle, unsigned char *cp);
00007
00008 static inline int sat_chksum_len(Id type)
00009 {
00010 switch (type)
00011 {
00012 case REPOKEY_TYPE_MD5:
00013 return 16;
00014 case REPOKEY_TYPE_SHA1:
00015 return 20;
00016 case REPOKEY_TYPE_SHA256:
00017 return 32;
00018 default:
00019 return 0;
00020 }
00021 }