Ruby  2.7.1p83(2020-03-31revisiona0c7c23c9cec0d0ffcba012279cd652d28ad5bf3)
Data Structures | Macros | Typedefs | Functions
siphash.h File Reference
#include <stdlib.h>

Go to the source code of this file.

Data Structures

struct  sip_uint64_t
 
struct  sip_state
 
struct  sip_hash
 

Macros

#define uint64_t   sip_uint64_t
 

Typedefs

typedef struct sip_interface_st sip_interface
 

Functions

sip_hashsip_hash_new (const uint8_t key[16], int c, int d)
 
sip_hashsip_hash_init (sip_hash *h, const uint8_t key[16], int c, int d)
 
int sip_hash_update (sip_hash *h, const uint8_t *data, size_t len)
 
int sip_hash_final (sip_hash *h, uint8_t **digest, size_t *len)
 
int sip_hash_final_integer (sip_hash *h, uint64_t *digest)
 
int sip_hash_digest (sip_hash *h, const uint8_t *data, size_t data_len, uint8_t **digest, size_t *digest_len)
 
int sip_hash_digest_integer (sip_hash *h, const uint8_t *data, size_t data_len, uint64_t *digest)
 
void sip_hash_free (sip_hash *h)
 
void sip_hash_dump (sip_hash *h)
 
 NO_SANITIZE ("unsigned-integer-overflow", uint64_t sip_hash13(const uint8_t key[16], const uint8_t *data, size_t len))
 

Macro Definition Documentation

◆ uint64_t

#define uint64_t   sip_uint64_t

Definition at line 15 of file siphash.h.

Typedef Documentation

◆ sip_interface

Definition at line 29 of file siphash.h.

Function Documentation

◆ NO_SANITIZE()

NO_SANITIZE ( "unsigned-integer-overflow"  ,
uint64_t   sip_hash13const uint8_t key[16], const uint8_t *data, size_t len 
)

◆ sip_hash_digest()

int sip_hash_digest ( sip_hash h,
const uint8_t data,
size_t  data_len,
uint8_t **  digest,
size_t digest_len 
)

Definition at line 363 of file siphash.c.

References h, sip_hash_final(), and sip_hash_update().

◆ sip_hash_digest_integer()

int sip_hash_digest_integer ( sip_hash h,
const uint8_t data,
size_t  data_len,
uint64_t digest 
)

Definition at line 370 of file siphash.c.

References h, sip_hash_final_integer(), and sip_hash_update().

◆ sip_hash_dump()

void sip_hash_dump ( sip_hash h)

Definition at line 383 of file siphash.c.

◆ sip_hash_final()

int sip_hash_final ( sip_hash h,
uint8_t **  digest,
size_t len 
)

Definition at line 341 of file siphash.c.

References h, len, malloc(), U64TO8_LE, and uint64_t.

Referenced by sip_hash_digest().

◆ sip_hash_final_integer()

int sip_hash_final_integer ( sip_hash h,
uint64_t digest 
)

Definition at line 356 of file siphash.c.

References h.

Referenced by sip_hash_digest_integer().

◆ sip_hash_free()

void sip_hash_free ( sip_hash h)

Definition at line 377 of file siphash.c.

References free, and h.

◆ sip_hash_init()

sip_hash* sip_hash_init ( sip_hash h,
const uint8_t  key[16],
int  c,
int  d 
)

Definition at line 322 of file siphash.c.

References h.

Referenced by sip_hash_new().

◆ sip_hash_new()

sip_hash* sip_hash_new ( const uint8_t  key[16],
int  c,
int  d 
)

Definition at line 313 of file siphash.c.

References h, key, malloc(), NULL, and sip_hash_init().

◆ sip_hash_update()

int sip_hash_update ( sip_hash h,
const uint8_t data,
size_t  len 
)

Definition at line 334 of file siphash.c.

Referenced by sip_hash_digest(), and sip_hash_digest_integer().