12 #ifndef ZYPP_MEDIA_MEDIABLOCKLIST_H
13 #define ZYPP_MEDIA_MEDIABLOCKLIST_H
15 #include <sys/types.h>
51 size_t addBlock(off_t off,
size_t size);
92 void setChecksum(
size_t blkno, std::string cstype,
int csl,
unsigned char *cs,
size_t cspad=0);
93 bool checkChecksum(
size_t blkno,
const unsigned char *buf,
size_t bufl)
const;
103 void setRsum(
size_t blkno,
int rsl,
unsigned int rs,
size_t rspad=0);
104 bool checkRsum(
size_t blkno,
const unsigned char *buf,
size_t bufl)
const;
105 unsigned int updateRsum(
unsigned int rs,
const char *bytes,
size_t len)
const;
106 bool verifyRsum(
size_t blkno,
unsigned int rs)
const;
123 void writeBlock(
size_t blkno, FILE *fp,
const unsigned char *buf,
size_t bufl,
size_t start, std::vector<bool> &found)
const;
124 bool checkChecksumRotated(
size_t blkno,
const unsigned char *buf,
size_t bufl,
size_t start)
const;
128 std::vector<unsigned char>
fsum;
150 #endif // ZYPP_MEDIA_MEDIABLOCKLIST_H
Compute Message Digests (MD5, SHA1 etc)