parsec_interface/operations/can_do_crypto.rs
1// Copyright 2021 Contributors to the Parsec project.
2// SPDX-License-Identifier: Apache-2.0
3//! # CanDoCrypto operation
4//!
5//! Checks if the provider supports the input attributes for the operations of a given type
6
7use super::psa_key_attributes::Attributes;
8
9/// Public enum which stores the options for the types of check
10#[derive(Debug, Clone, PartialEq, Eq, Hash, Copy)]
11pub enum CheckType {
12 /// Using a specific algorithm with an existing key.
13 Use,
14 /// Generating a key and optionally using it for a specific algorithm.
15 Generate,
16 /// Importing a key and optionally using it for a specific algorithm.
17 Import,
18 /// Deriving a key and optionally using it for a specific algorithm (to be checked)
19 Derive,
20}
21
22/// Native object for client deleting operation.
23#[derive(Clone, Debug, Copy)]
24pub struct Operation {
25 /// The type of check required
26 pub check_type: CheckType,
27 /// The attributes that are to be checked
28 pub attributes: Attributes,
29}
30
31/// Native object for client deleting result.
32#[derive(Copy, Clone, Debug)]
33pub struct Result;