Interface to platform-dependent run-time operations.
More...
#include <stdint.h>
#include <stddef.h>
Go to the source code of this file.
|
unsigned int | _copy (uint8_t *to, unsigned int to_len, const uint8_t *from, unsigned int from_len) |
| Copy the the buffer 'from' to the buffer 'to'. More...
|
|
void | _set (void *to, uint8_t val, unsigned int len) |
| Set the value 'val' into the buffer 'to', 'len' times. More...
|
|
uint8_t | _double_byte (uint8_t a) |
|
int | _compare (const uint8_t *a, const uint8_t *b, size_t size) |
|
Interface to platform-dependent run-time operations.
◆ _compare()
int _compare |
( |
const uint8_t * |
a, |
|
|
const uint8_t * |
b, |
|
|
size_t |
size |
|
) |
| |
◆ _copy()
unsigned int _copy |
( |
uint8_t * |
to, |
|
|
unsigned int |
to_len, |
|
|
const uint8_t * |
from, |
|
|
unsigned int |
from_len |
|
) |
| |
Copy the the buffer 'from' to the buffer 'to'.
- Returns
- returns TC_CRYPTO_SUCCESS (1) returns TC_CRYPTO_FAIL (0) if: from_len > to_len.
- Parameters
-
to | OUT – destination buffer |
to_len | IN – length of destination buffer |
from | IN – origin buffer |
from_len | IN – length of origin buffer |
◆ _double_byte()
uint8_t _double_byte |
( |
uint8_t |
a | ) |
|
◆ _set()
void _set |
( |
void * |
to, |
|
|
uint8_t |
val, |
|
|
unsigned int |
len |
|
) |
| |
Set the value 'val' into the buffer 'to', 'len' times.
- Parameters
-
to | OUT – destination buffer |
val | IN – value to be set in 'to' |
len | IN – number of times the value will be copied |