riot_hashes.h
1 /*
2  * SPDX-FileCopyrightText: 2022 HAW Hamburg
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 #include "kernel_defines.h"
23 
24 #if (IS_USED(MODULE_PSA_RIOT_HASHES_MD5))
25 #include "hashes/md5.h"
26 
27 typedef md5_ctx_t psa_hashes_md5_ctx_t;
28 #endif
29 
30 #if (IS_USED(MODULE_PSA_RIOT_HASHES_SHA_1))
31 #include "hashes/sha1.h"
32 
34 #endif
35 
36 #if (IS_USED(MODULE_PSA_RIOT_HASHES_SHA_224))
37 #include "hashes/sha224.h"
38 
40 #endif
41 
42 #if (IS_USED(MODULE_PSA_RIOT_HASHES_SHA_256))
43 #include "hashes/sha256.h"
44 
46 #endif
47 
48 #if (IS_USED(MODULE_PSA_RIOT_HASHES_SHA_384))
49 #include "hashes/sha384.h"
50 
51 typedef sha384_context_t psa_hashes_sha384_ctx_t;
52 #endif
53 
54 #if (IS_USED(MODULE_PSA_RIOT_HASHES_SHA_512))
55 #include "hashes/sha512.h"
56 
58 #endif
59 
60 #if (IS_USED(MODULE_PSA_RIOT_HASHES_SHA_512_224))
61 #include "hashes/sha512_224.h"
62 
63 typedef sha512_224_context_t psa_hashes_sha512_224_ctx_t;
64 #endif
65 
66 #if (IS_USED(MODULE_PSA_RIOT_HASHES_SHA_512_256))
67 #include "hashes/sha512_256.h"
68 
69 typedef sha512_256_context_t psa_hashes_sha512_256_ctx_t;
70 #endif
71 
72 #if (IS_USED(MODULE_PSA_RIOT_HASHES_HMAC_SHA256))
73 #include "hashes/sha256.h"
74 #endif
75 
76 #if (IS_USED(MODULE_PSA_RIOT_HASHES_SHA3_256) \
77 || IS_USED(MODULE_PSA_RIOT_HASHES_SHA3_384) \
78 || IS_USED(MODULE_PSA_RIOT_HASHES_SHA3_512))
79 #include "hashes/sha3.h"
80 
81 typedef keccak_state_t psa_hashes_sha3_ctx_t;
82 #endif
83 
84 #ifdef __cplusplus
85 }
86 #endif
87 
Common macros and compiler attributes/pragmas configuration.
MD5 interface definition.
CRYS_HASHUserContext_t psa_hashes_sha224_ctx_t
Map driver specific SHA224 context to PSA context.
CRYS_HASHUserContext_t psa_hashes_sha256_ctx_t
Map driver specific SHA256 context to PSA context.
CRYS_HASHUserContext_t psa_hashes_sha512_ctx_t
Map driver specific SHA512 context to PSA context.
CRYS_HASHUserContext_t psa_hashes_sha1_ctx_t
Map driver specific SHA1 context to PSA context.
SHA-1 interface definition.
Header definitions for the SHA224 hash function.
Header definitions for the SHA256 hash function.
Header definitions for the SHA384 hash function.
Header definitions for the SHA-3 hash function.
Header definitions for the SHA512 hash function.
Header definitions for the SHA512/224 hash function.
Header definitions for the SHA512/256 hash function.
Context for operations on a sponge with keccak permutation.
Definition: sha3.h:52
MD5 calculation context.
Definition: md5.h:58
SHA-1 algorithm context.
Definition: sha1.h:45
Structure to hold the SHA-2XX context.
Definition: sha2xx_common.h:38
Structure to hold the SHA-512 context.
Definition: sha512_common.h:30