#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdio.h>
Go to the source code of this file.
|
| void | hex_to_bytes (const char *hex, unsigned char *bytes, size_t len) |
| void | print_hex (const unsigned char *bytes, size_t len) |
| int | bytes_to_hex (const unsigned char *input, char *output, size_t len) |
| uint32_t | bytes_to_uint32 (const unsigned char *input) |
| void | uint32_to_bytes (const uint32_t input, unsigned char *output) |
| uint32_t | bytes_to_uint32_be (const unsigned char *input) |
| void | uint32_to_bytes_be (const uint32_t input, unsigned char *output) |
| void | shift_left_one (unsigned char *input, size_t length) |
| int | constant_time_compare (const unsigned char *a, const unsigned char *b, size_t len) |
| void | secure_zero (void *p, size_t len) |
| | An analogue of memset_explicit for older versions of glibc.
|
◆ bytes_to_hex()
| int bytes_to_hex |
( |
const unsigned char * | input, |
|
|
char * | output, |
|
|
size_t | len ) |
◆ bytes_to_uint32()
| uint32_t bytes_to_uint32 |
( |
const unsigned char * | input | ) |
|
◆ bytes_to_uint32_be()
| uint32_t bytes_to_uint32_be |
( |
const unsigned char * | input | ) |
|
◆ constant_time_compare()
| int constant_time_compare |
( |
const unsigned char * | a, |
|
|
const unsigned char * | b, |
|
|
size_t | len ) |
◆ hex_to_bytes()
| void hex_to_bytes |
( |
const char * | hex, |
|
|
unsigned char * | bytes, |
|
|
size_t | len ) |
◆ print_hex()
| void print_hex |
( |
const unsigned char * | bytes, |
|
|
size_t | len ) |
◆ secure_zero()
| void secure_zero |
( |
void * | p, |
|
|
size_t | len ) |
An analogue of memset_explicit for older versions of glibc.
- Parameters
-
| p | A pointer to the resource to be reset. |
| len | The length to be reset to zero |
◆ shift_left_one()
| void shift_left_one |
( |
unsigned char * | input, |
|
|
size_t | length ) |
◆ uint32_to_bytes()
| void uint32_to_bytes |
( |
const uint32_t | input, |
|
|
unsigned char * | output ) |
◆ uint32_to_bytes_be()
| void uint32_to_bytes_be |
( |
const uint32_t | input, |
|
|
unsigned char * | output ) |