Noise-C
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Macros | Functions
util.h File Reference

Utility function interface. More...

#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Macros

#define noise_new(type)   ((type *)noise_new_object(sizeof(type)))
 Allocates an object from the system and initializes it. More...
 

Functions

void noise_clean (void *data, size_t size)
 Cleans a block of memory to destroy its contents. More...
 
int noise_format_fingerprint (int fingerprint_type, char *buffer, size_t len, const uint8_t *public_key, size_t public_key_len)
 Formats the fingerprint for a raw public key value. More...
 
void noise_free (void *ptr, size_t size)
 Destroys the contents of a block of memory and free it. More...
 
int noise_init (void)
 Initializes the Noise-c library. More...
 
int noise_is_equal (const void *s1, const void *s2, size_t size)
 Determine if two blocks of memory are equal in constant time. More...
 
int noise_is_zero (const void *data, size_t size)
 Determine if a block of memory consists of all zero bytes. More...
 
void * noise_new_object (size_t size)
 Allocates memory from the system for an object. More...
 

Detailed Description

Utility function interface.

Definition in file util.h.