xorriso  1.5.4.pl02
About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.
  Fossies Dox: xorriso-1.5.4.pl02.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

checksum.c File Reference
#include <sys/types.h>
#include <regex.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/stat.h>
#include "md5.h"
#include "sha1.h"
#include "sha256.h"
#include "sha512.h"
#include "checksum.h"
Include dependency graph for checksum.c:

Go to the source code of this file.

Data Structures

struct  checksum_details
 
struct  algo_context
 
struct  _checksum_context
 

Functions

static void md5_init (void *context)
 
static void md5_update (void *context, unsigned char const *buf, unsigned int len)
 
static void md5_final (unsigned char *digest, void *context)
 
static void sha1_init (void *context)
 
static void sha1_update (void *context, unsigned char const *buf, unsigned int len)
 
static void sha1_final (unsigned char *digest, void *context)
 
static void sha256_init (void *context)
 
static void sha256_update (void *context, unsigned char const *buf, unsigned int len)
 
static void sha256_final (unsigned char *digest, void *context)
 
static void sha512_init (void *context)
 
static void sha512_update (void *context, unsigned char const *buf, unsigned int len)
 
static void sha512_final (unsigned char *digest, void *context)
 
struct checksum_infochecksum_information (enum checksum_types which)
 
static void hex_dump_to_buffer (char *output_buffer, unsigned char *buf, size_t buf_size)
 
checksum_context_tchecksum_init_context (int checksums, const char *owner)
 
void checksum_free_context (checksum_context_t *context)
 
void checksum_update (checksum_context_t *context, unsigned char const *buf, unsigned int len)
 
void checksum_final (checksum_context_t *context)
 
void checksum_copy (checksum_context_t *context, enum checksum_types which, unsigned char *digest)
 
const char * checksum_hex (checksum_context_t *context, enum checksum_types which)
 
int parse_checksum_algo (char *arg, int *algo)
 
int checksum_calculate (char *filename, int64_t size, unsigned char *out, enum checksum_types which)
 
int checksum_parse_hex (char *in, unsigned char *out, int size)
 

Variables

static const struct checksum_details algorithms []
 

Function Documentation

◆ checksum_calculate()

int checksum_calculate ( char *  filename,
int64_t  size,
unsigned char *  out,
enum checksum_types  which 
)

◆ checksum_copy()

void checksum_copy ( checksum_context_t context,
enum checksum_types  which,
unsigned char *  digest 
)

◆ checksum_final()

◆ checksum_free_context()

◆ checksum_hex()

const char* checksum_hex ( checksum_context_t context,
enum checksum_types  which 
)

◆ checksum_information()

struct checksum_info* checksum_information ( enum checksum_types  which)

Definition at line 180 of file checksum.c.

References algorithms.

Referenced by write_jigdo_file().

◆ checksum_init_context()

◆ checksum_parse_hex()

int checksum_parse_hex ( char *  in,
unsigned char *  out,
int  size 
)

Definition at line 576 of file checksum.c.

Referenced by parse_checksum_list().

◆ checksum_update()

void checksum_update ( checksum_context_t context,
unsigned char const *  buf,
unsigned int  len 
)

◆ hex_dump_to_buffer()

static void hex_dump_to_buffer ( char *  output_buffer,
unsigned char *  buf,
size_t  buf_size 
)
static

Definition at line 186 of file checksum.c.

Referenced by checksum_final().

◆ md5_final()

static void md5_final ( unsigned char *  digest,
void *  context 
)
static

Definition at line 48 of file checksum.c.

References mk_MD5Final().

◆ md5_init()

static void md5_init ( void *  context)
static

Definition at line 40 of file checksum.c.

References mk_MD5Init().

◆ md5_update()

static void md5_update ( void *  context,
unsigned char const *  buf,
unsigned int  len 
)
static

Definition at line 44 of file checksum.c.

References mk_MD5Update().

◆ parse_checksum_algo()

int parse_checksum_algo ( char *  arg,
int *  algo 
)

◆ sha1_final()

static void sha1_final ( unsigned char *  digest,
void *  context 
)
static

Definition at line 61 of file checksum.c.

References sha1_finish_ctx(), and sha1_read().

◆ sha1_init()

static void sha1_init ( void *  context)
static

Definition at line 53 of file checksum.c.

References sha1_init_ctx().

◆ sha1_update()

static void sha1_update ( void *  context,
unsigned char const *  buf,
unsigned int  len 
)
static

Definition at line 57 of file checksum.c.

References sha1_write().

◆ sha256_final()

static void sha256_final ( unsigned char *  digest,
void *  context 
)
static

Definition at line 75 of file checksum.c.

References sha256_finish_ctx().

◆ sha256_init()

static void sha256_init ( void *  context)
static

Definition at line 67 of file checksum.c.

References sha256_init_ctx().

◆ sha256_update()

static void sha256_update ( void *  context,
unsigned char const *  buf,
unsigned int  len 
)
static

Definition at line 71 of file checksum.c.

References sha256_process_bytes().

◆ sha512_final()

static void sha512_final ( unsigned char *  digest,
void *  context 
)
static

Definition at line 88 of file checksum.c.

◆ sha512_init()

static void sha512_init ( void *  context)
static

Definition at line 80 of file checksum.c.

References sha512_init_ctx().

◆ sha512_update()

static void sha512_update ( void *  context,
unsigned char const *  buf,
unsigned int  len 
)
static

Definition at line 84 of file checksum.c.

References sha512_process_bytes().

Variable Documentation

◆ algorithms

const struct checksum_details algorithms[]
static