Soletta™ Framework
Framework for making IoT devices

Full online documentation | C API Index
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Enumerations | Functions | Variables
sha256sum.c File Reference
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <getopt.h>
#include "soletta.h"
#include "sol-buffer.h"
#include "sol-file-reader.h"
#include "sol-str-table.h"
#include "sol-message-digest.h"
#include "sol-util.h"

Data Structures

struct  entry
 

Enumerations

enum  log_level { LOG_LEVEL_DEFAULT = 0, LOG_LEVEL_QUIET, LOG_LEVEL_STATUS }
 

Functions

static int check_file (const char *filename)
 
static int check_stdin (void)
 
static void entry_del (struct entry *entry)
 
static struct entryentry_new (const char *filename)
 
static int fd_set_flag (int fd, int flag)
 
static int hash_file (const char *filename)
 
static int hash_stdin (void)
 
static bool on_stdin_hash (void *data, int fd, uint32_t flags)
 
static int process_input (const char *filename)
 
static int process_stdin (void)
 
static void shutdown (void)
 
 SOL_MAIN_DEFAULT (startup, shutdown)
 
static void startup (void)
 
static void store_digest (void *data, struct sol_message_digest *handle, struct sol_blob *digest)
 

Variables

static const char algorithm [] = "sha256"
 
static bool checking = false
 
static bool checking_strict = false
 
static bool checking_warn = false
 
static struct sol_ptr_vector entries = SOL_PTR_VECTOR_INIT
 
static enum log_level log_level = LOG_LEVEL_DEFAULT
 
static uint32_t pending
 
static const char stdin_filename [] = "-"
 
static struct sol_fd * stdin_watch
 

Enumeration Type Documentation

enum log_level
Enumerator
LOG_LEVEL_DEFAULT 
LOG_LEVEL_QUIET 
LOG_LEVEL_STATUS 

Function Documentation

static int check_file ( const char *  filename)
static
static int check_stdin ( void  )
static
static void entry_del ( struct entry entry)
static
static struct entry* entry_new ( const char *  filename)
static
static int fd_set_flag ( int  fd,
int  flag 
)
static
Examples:
/src/samples/crypto/sha256sum.c.

Referenced by hash_stdin().

static int hash_file ( const char *  filename)
static
static int hash_stdin ( void  )
static
static bool on_stdin_hash ( void *  data,
int  fd,
uint32_t  flags 
)
static
static int process_input ( const char *  filename)
static
static int process_stdin ( void  )
static
static void shutdown ( void  )
static
SOL_MAIN_DEFAULT ( startup  ,
shutdown   
)
static void startup ( void  )
static
static void store_digest ( void *  data,
struct sol_message_digest handle,
struct sol_blob digest 
)
static

Variable Documentation

const char algorithm[] = "sha256"
static
bool checking = false
static
bool checking_strict = false
static
Examples:
/src/samples/crypto/sha256sum.c.

Referenced by startup().

bool checking_warn = false
static
Examples:
/src/samples/crypto/sha256sum.c.

Referenced by startup().

struct sol_ptr_vector entries = SOL_PTR_VECTOR_INIT
static
uint32_t pending
static
const char stdin_filename[] = "-"
static
struct sol_fd* stdin_watch
static