helper.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2015 Freie Universität Berlin
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
19 #include <stddef.h>
20 #include <stdint.h>
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
34 void crypto_block_inc_ctr(uint8_t block[16], int L);
35 
45 int crypto_equals(const uint8_t *a, const uint8_t *b, size_t len);
46 
60 void crypto_secure_wipe(void *buf, size_t len);
61 
62 #ifdef __cplusplus
63 }
64 #endif
65 
void crypto_block_inc_ctr(uint8_t block[16], int L)
Increment a counter encoded in an 16 octet block.
void crypto_secure_wipe(void *buf, size_t len)
Secure wipe function.
int crypto_equals(const uint8_t *a, const uint8_t *b, size_t len)
Compares two blocks of same size in deterministic time.