#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "pool.h"
#include "util.h"
#include "chksum.h"
#include "md5.h"
#include "sha1.h"
#include "sha2.h"
Go to the source code of this file.
Classes | |
struct | ctxhandle |
Functions | |
void * | sat_chksum_create (Id type) |
void | sat_chksum_add (void *handle, const void *data, int len) |
unsigned char * | sat_chksum_get (void *handle, int *lenp) |
void * | sat_chksum_free (void *handle, unsigned char *cp) |
void* sat_chksum_create | ( | Id | type | ) |
Definition at line 27 of file chksum.c.
References ctxhandle::c, ctxhandle::md5, sat_calloc(), sat_MD5_Init(), sat_SHA1_Init(), sat_SHA256_Init(), ctxhandle::sha1, ctxhandle::sha256, and ctxhandle::type.
void sat_chksum_add | ( | void * | handle, | |
const void * | data, | |||
int | len | |||
) |
Definition at line 49 of file chksum.c.
References ctxhandle::c, ctxhandle::md5, sat_MD5_Update(), sat_SHA1_Update(), sat_SHA256_Update(), ctxhandle::sha1, ctxhandle::sha256, and ctxhandle::type.
unsigned char* sat_chksum_get | ( | void * | handle, | |
int * | lenp | |||
) |
Definition at line 69 of file chksum.c.
References ctxhandle::c, ctxhandle::done, ctxhandle::md5, ctxhandle::result, sat_MD5_Final(), sat_SHA1_Final(), sat_SHA256_Final(), ctxhandle::sha1, ctxhandle::sha256, and ctxhandle::type.
Referenced by sat_chksum_free().
void* sat_chksum_free | ( | void * | handle, | |
unsigned char * | cp | |||
) |