Coverage Report

Created: 2025-11-16 06:37

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/rust/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-rs-1.12.4/src/pkcs8.rs
Line
Count
Source
1
// Copyright 2017 Brian Smith.
2
// SPDX-License-Identifier: ISC
3
// Modifications copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
// SPDX-License-Identifier: Apache-2.0 OR ISC
5
6
//! PKCS#8 is specified in [RFC 5208].
7
//!
8
//! [RFC 5208]: https://tools.ietf.org/html/rfc5208.
9
10
use zeroize::Zeroize;
11
12
/// A generated PKCS#8 document.
13
pub struct Document {
14
    bytes: Vec<u8>,
15
}
16
17
impl Document {
18
0
    pub(crate) fn new(bytes: Vec<u8>) -> Self {
19
0
        Self { bytes }
20
0
    }
21
}
22
23
impl AsRef<[u8]> for Document {
24
    #[inline]
25
0
    fn as_ref(&self) -> &[u8] {
26
0
        &self.bytes
27
0
    }
Unexecuted instantiation: <aws_lc_rs::pkcs8::Document as core::convert::AsRef<[u8]>>::as_ref
Unexecuted instantiation: <aws_lc_rs::pkcs8::Document as core::convert::AsRef<[u8]>>::as_ref
28
}
29
30
impl Drop for Document {
31
0
    fn drop(&mut self) {
32
0
        self.bytes.zeroize();
33
0
    }
34
}
35
36
#[derive(Copy, Clone)]
37
pub(crate) enum Version {
38
    V1,
39
    V2,
40
}