parsec_interface/operations/psa_generate_random.rs
1// Copyright 2020 Contributors to the Parsec project.
2// SPDX-License-Identifier: Apache-2.0
3//! # PsaGenerateRandom operation
4//!
5//! Generate random bytes.
6
7use derivative::Derivative;
8
9/// Native object for creating a cryptographic key.
10#[derive(Copy, Clone, Debug)]
11pub struct Operation {
12 /// `size` specifies how many random bytes to fetch.
13 pub size: usize,
14}
15
16/// Native object for random bytes result.
17#[derive(Derivative)]
18#[derivative(Debug)]
19pub struct Result {
20 /// Random bytes.
21 #[derivative(Debug = "ignore")]
22 pub random_bytes: zeroize::Zeroizing<Vec<u8>>,
23}