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