Mistake on this page?
Report an issue in GitHub or email us
crypto_struct_ipc.h
1 /**
2  * \file psa/crypto_struct.h
3  *
4  * \brief PSA cryptography module: Mbed TLS structured type implementations
5  */
6 /*
7  * Copyright (C) 2018, ARM Limited, All Rights Reserved
8  * SPDX-License-Identifier: Apache-2.0
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License"); you may
11  * not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
18  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  * This file is part of mbed TLS (https://tls.mbed.org)
23  */
24 
25 #ifndef PSA_CRYPTO_STRUCT_H
26 #define PSA_CRYPTO_STRUCT_H
27 
28 #include "psa/client.h"
29 
31  psa_handle_t handle;
32 };
33 
34 #define PSA_HASH_OPERATION_INIT { PSA_NULL_HANDLE }
35 static inline struct psa_hash_operation_s psa_hash_operation_init(void)
36 {
37  const struct psa_hash_operation_s v = PSA_HASH_OPERATION_INIT;
38  return (v);
39 }
40 
42  psa_handle_t handle;
43 };
44 
45 #define PSA_MAC_OPERATION_INIT { PSA_NULL_HANDLE }
46 static inline struct psa_mac_operation_s psa_mac_operation_init(void)
47 {
48  const struct psa_mac_operation_s v = PSA_MAC_OPERATION_INIT;
49  return (v);
50 }
51 
53  psa_handle_t handle;
54 };
55 
56 #define PSA_CIPHER_OPERATION_INIT { PSA_NULL_HANDLE }
57 static inline struct psa_cipher_operation_s psa_cipher_operation_init(void)
58 {
59  const struct psa_cipher_operation_s v = PSA_CIPHER_OPERATION_INIT;
60  return (v);
61 }
62 
64  psa_handle_t handle;
65 };
66 
67 #define PSA_CRYPTO_GENERATOR_INIT { PSA_NULL_HANDLE }
68 static inline struct psa_crypto_generator_s psa_crypto_generator_init(void)
69 {
70  const struct psa_crypto_generator_s v = PSA_CRYPTO_GENERATOR_INIT;
71  return (v);
72 }
73 
75  psa_key_usage_t usage;
76  psa_algorithm_t alg;
77 };
78 
79 #define PSA_KEY_POLICY_INIT {0, 0}
80 static inline struct psa_key_policy_s psa_key_policy_init(void)
81 {
82  const struct psa_key_policy_s v = PSA_KEY_POLICY_INIT;
83  return (v);
84 }
85 
86 #endif /* PSA_CRYPTO_STRUCT_H */
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.