tss_esapi/structures/attestation/
nv_digest_certify_info.rs

1// Copyright 2021 Contributors to the Parsec project.
2// SPDX-License-Identifier: Apache-2.0
3
4use crate::structures::{Digest, Name};
5
6/// This structure contains the Name and hash of the
7/// contents of the selected NV Index that is certified by
8/// TPM2_NV_Certify()
9///
10/// # Details
11/// This corresponds to  TPMS_NV_DIGEST_CERTIFY_INFO.
12#[derive(Debug, Clone)]
13pub struct NvDigestCertifyInfo {
14    index_name: Name,
15    nv_digest: Digest,
16}
17
18impl NvDigestCertifyInfo {
19    /// Returns the index name
20    pub const fn index_name(&self) -> &Name {
21        &self.index_name
22    }
23
24    /// Returns the NV digest.
25    pub const fn nv_digest(&self) -> &Digest {
26        &self.nv_digest
27    }
28}