SSS - S3 Toolkit 0.9.6
S3 client library and applications
Loading...
Searching...
No Matches
utility.h File Reference

Declaration of utility functions for SHA256 hashing. More...

#include <cstdint>
#include <cstdio>
#include <cstdlib>
+ Include dependency graph for utility.h:
+ This graph shows which files directly or indirectly include this file:

Functions

uint64_t to_big_endian (uint64_t n)
 Convert number from little endian to big endian.
 
uint32_t to_little_endian (uint32_t n)
 Convert from big endian to little endian.
 
uint64_t next_div_by (uint64_t n, uint64_t d)
 Return next number evenly divisible by specified number.
 
uint32_t right_rotate (uint32_t x, uint32_t n)
 Right rotate bits of 32 bit integer numbers.
 
uint32_t left_rotate (uint32_t x, uint32_t n)
 Left rotate bits of 32 bit integer numbers.
 
uint32_t lshift (uint8_t n, uint8_t nshifts)
 Left shift of unsigned 8 bit int and conversion to 32 bit.
 
uint8_t * alloc_padded (uint64_t size, uint64_t buffer_size, size_t *sz, uint8_t *tmpbuf)
 Allocate buffer of correct size for computing hash code.
 

Detailed Description

Declaration of utility functions for SHA256 hashing.