|
2 | 2 | * \file psa/crypto_struct.h
|
3 | 3 | *
|
4 | 4 | * \brief PSA cryptography module: Mbed TLS structured type implementations
|
| 5 | + * |
| 6 | + * \note This file may not be included directly. Applications must |
| 7 | + * include psa/crypto.h. |
| 8 | + * |
| 9 | + * This file contains the definitions of some data structures with |
| 10 | + * implementation-specific definitions. |
| 11 | + * |
| 12 | + * In implementations with isolation between the application and the |
| 13 | + * cryptography module, it is expected that the front-end and the back-end |
| 14 | + * would have different versions of this file. |
5 | 15 | */
|
6 | 16 | /*
|
7 | 17 | * Copyright (C) 2018, ARM Limited, All Rights Reserved
|
|
27 | 37 |
|
28 | 38 | #include "psa/client.h"
|
29 | 39 |
|
30 |
| -struct psa_hash_operation_s { |
| 40 | +struct psa_hash_operation_s |
| 41 | +{ |
31 | 42 | psa_handle_t handle;
|
32 | 43 | };
|
33 | 44 |
|
34 | 45 | #define PSA_HASH_OPERATION_INIT { PSA_NULL_HANDLE }
|
35 |
| -static inline struct psa_hash_operation_s psa_hash_operation_init(void) |
| 46 | +static inline struct psa_hash_operation_s psa_hash_operation_init( void ) |
36 | 47 | {
|
37 | 48 | const struct psa_hash_operation_s v = PSA_HASH_OPERATION_INIT;
|
38 |
| - return (v); |
| 49 | + return( v ); |
39 | 50 | }
|
40 | 51 |
|
41 |
| -struct psa_mac_operation_s { |
| 52 | +struct psa_mac_operation_s |
| 53 | +{ |
42 | 54 | psa_handle_t handle;
|
43 | 55 | };
|
44 | 56 |
|
45 | 57 | #define PSA_MAC_OPERATION_INIT { PSA_NULL_HANDLE }
|
46 |
| -static inline struct psa_mac_operation_s psa_mac_operation_init(void) |
| 58 | +static inline struct psa_mac_operation_s psa_mac_operation_init( void ) |
47 | 59 | {
|
48 | 60 | const struct psa_mac_operation_s v = PSA_MAC_OPERATION_INIT;
|
49 |
| - return (v); |
| 61 | + return( v ); |
50 | 62 | }
|
51 | 63 |
|
52 |
| -struct psa_cipher_operation_s { |
| 64 | +struct psa_cipher_operation_s |
| 65 | +{ |
53 | 66 | psa_handle_t handle;
|
54 | 67 | };
|
55 | 68 |
|
56 | 69 | #define PSA_CIPHER_OPERATION_INIT { PSA_NULL_HANDLE }
|
57 |
| -static inline struct psa_cipher_operation_s psa_cipher_operation_init(void) |
| 70 | +static inline struct psa_cipher_operation_s psa_cipher_operation_init( void ) |
58 | 71 | {
|
59 | 72 | const struct psa_cipher_operation_s v = PSA_CIPHER_OPERATION_INIT;
|
60 |
| - return (v); |
| 73 | + return( v ); |
61 | 74 | }
|
62 | 75 |
|
63 |
| -struct psa_crypto_generator_s { |
| 76 | +struct psa_crypto_generator_s |
| 77 | +{ |
64 | 78 | psa_handle_t handle;
|
65 | 79 | };
|
66 | 80 |
|
67 | 81 | #define PSA_CRYPTO_GENERATOR_INIT { PSA_NULL_HANDLE }
|
68 |
| -static inline struct psa_crypto_generator_s psa_crypto_generator_init(void) |
| 82 | +static inline struct psa_crypto_generator_s psa_crypto_generator_init( void ) |
69 | 83 | {
|
70 | 84 | const struct psa_crypto_generator_s v = PSA_CRYPTO_GENERATOR_INIT;
|
71 |
| - return (v); |
| 85 | + return( v ); |
72 | 86 | }
|
73 | 87 |
|
74 |
| -struct psa_key_policy_s { |
| 88 | +struct psa_key_policy_s |
| 89 | +{ |
75 | 90 | psa_key_usage_t usage;
|
76 | 91 | psa_algorithm_t alg;
|
77 | 92 | };
|
78 | 93 |
|
79 | 94 | #define PSA_KEY_POLICY_INIT {0, 0}
|
80 |
| -static inline struct psa_key_policy_s psa_key_policy_init(void) |
| 95 | +static inline struct psa_key_policy_s psa_key_policy_init( void ) |
81 | 96 | {
|
82 | 97 | const struct psa_key_policy_s v = PSA_KEY_POLICY_INIT;
|
83 |
| - return (v); |
| 98 | + return( v ); |
84 | 99 | }
|
85 | 100 |
|
86 | 101 | #endif /* PSA_CRYPTO_STRUCT_H */
|
0 commit comments