libdecaf
Macros | Typedefs | Enumerations | Functions
common.h File Reference

Common utility headers for Decaf library. More...

Go to the source code of this file.

Macros

#define DECAF_WORD_BITS   32
 The number of bits in a word. More...
 

Typedefs

typedef uint32_t decaf_word_t
 Word size for internal computations.
 
typedef int32_t decaf_sword_t
 Signed word size for internal computations.
 
typedef uint32_t decaf_bool_t
 "Boolean" type, will be set to all-zero or all-one (i.e. More...
 
typedef uint64_t decaf_dword_t
 Double-word size for internal computations.
 
typedef int64_t decaf_dsword_t
 Signed double-word size for internal computations.
 

Enumerations

enum  decaf_error_t { DECAF_SUCCESS = -1, DECAF_FAILURE = 0 }
 Another boolean type used to indicate success or failure. More...
 

Functions

void DECAF_API_VIS decaf_bzero (void *data, size_t size) DECAF_NONNULL
 Overwrite data with zeros. More...
 
decaf_bool_t DECAF_API_VIS decaf_memeq (const void *data1, const void *data2, size_t size) DECAF_NONNULL DECAF_WARN_UNUSED
 Compare two buffers, returning DECAF_TRUE if they are equal.
 

Detailed Description

Common utility headers for Decaf library.

Author
Mike Hamburg

Macro Definition Documentation

◆ DECAF_WORD_BITS

#define DECAF_WORD_BITS   32

The number of bits in a word.

The number of bits in a word

Typedef Documentation

◆ decaf_bool_t

typedef uint32_t decaf_bool_t

"Boolean" type, will be set to all-zero or all-one (i.e.

-1u)

Enumeration Type Documentation

◆ decaf_error_t

Another boolean type used to indicate success or failure.

Enumerator
DECAF_SUCCESS 

The operation succeeded.

DECAF_FAILURE 

The operation failed.

Function Documentation

◆ decaf_bzero()

void DECAF_API_VIS decaf_bzero ( void *  data,
size_t  size 
)

Overwrite data with zeros.

Uses memset_s if available.