pub struct PrivateKey<'a> {
pub version: u64,
pub algorithm: AlgorithmIdentifier<'a>,
pub secret: Octets<'a>,
pub attributes: Option<OwnedVec<Attribute<'a>>>,
pub public_key: Option<EncodedValue<'a>>,
}Expand description
RFC5958 OneAsymmetricKey / PKCS#8 PrivateKeyInfo.
Fields§
§version: u64Zero is v1; one is v2. Validated against public-key presence.
algorithm: AlgorithmIdentifier<'a>Original algorithm, not a key/backend selection.
secret: Octets<'a>Original secret key contents. Borrowed, including BER fragments.
attributes: Option<OwnedVec<Attribute<'a>>>Original optional key attributes, distinct from bag attributes.
public_key: Option<EncodedValue<'a>>Validated original IMPLICIT BIT STRING, including BER segmentation.
Implementations§
Auto Trait Implementations§
impl<'a> !Freeze for PrivateKey<'a>
impl<'a> !RefUnwindSafe for PrivateKey<'a>
impl<'a> !Send for PrivateKey<'a>
impl<'a> !Sync for PrivateKey<'a>
impl<'a> !UnwindSafe for PrivateKey<'a>
impl<'a> Unpin for PrivateKey<'a>
impl<'a> UnsafeUnpin for PrivateKey<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more