29 #include <sys/types.h> 65 int calc_sha256sum(
char* filename,
char* dst);
CksumFile * SumOpenFile(char *Fname)
Open and mmap a file.
Cksum * SumComputeFile(FILE *Fin)
Compute the checksum, allocate and return a string containing the sum value.
uint64_t MmapOffset
Index into mmap.
uint8_t SHA1digest[20]
SHA1 digest of the file.
int CountDigits(uint64_t Num)
Count how many digits are in a number.
uint8_t MD5digest[16]
MD5 digest of the file.
The main FOSSology C library.
unsigned char * Mmap
Mmap of the file.
Store check sum of a file.
uint64_t DataLen
Size of the file.
char * SumToString(Cksum *Sum)
Return string representing a Cksum. NOTE: The calling function must free() the string! ...
uint64_t MmapSize
Size of mmap.
void SumCloseFile(CksumFile *CF)
Close a file that was opened with SumOpenFile()
Cksum * SumComputeBuff(CksumFile *CF)
Compute the checksum, allocate and return a Cksum containing the sum value.
int FileHandle
File handler for the file.
Store file handler and mmap of a file.