tpm2_protocol/message/
random_number.rs1use crate::{
8 data::{Tpm2bDigest, Tpm2bSensitiveData, TpmCc},
9 tpm_struct,
10};
11use core::fmt::Debug;
12
13tpm_struct! {
14 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
15 kind: Command,
16 name: TpmGetRandomCommand,
17 cc: TpmCc::GetRandom,
18 handles: {},
19 parameters: {
20 pub bytes_requested: u16,
21 }
22}
23
24tpm_struct! {
25 #[derive(Debug, Default, PartialEq, Eq, Clone)]
26 kind: Response,
27 name: TpmGetRandomResponse,
28 cc: TpmCc::GetRandom,
29 handles: {},
30 parameters: {
31 pub random_bytes: Tpm2bDigest,
32 }
33}
34
35tpm_struct! {
36 #[derive(Debug, PartialEq, Eq, Clone)]
37 kind: Command,
38 name: TpmStirRandomCommand,
39 cc: TpmCc::StirRandom,
40 handles: {},
41 parameters: {
42 pub in_data: Tpm2bSensitiveData,
43 }
44}
45
46tpm_struct! {
47 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
48 kind: Response,
49 name: TpmStirRandomResponse,
50 cc: TpmCc::StirRandom,
51 handles: {},
52 parameters: {}
53}