pub struct PrivateKey { /* private fields */ }
Expand description
A raw private key for use with the certificate builder
Implementations§
Source§impl PrivateKey
impl PrivateKey
Sourcepub fn from_composite(
public_key: Option<PublicKey>,
composite_sk: &CompositePrivateKey,
) -> Result<Self, QuantCryptError>
pub fn from_composite( public_key: Option<PublicKey>, composite_sk: &CompositePrivateKey, ) -> Result<Self, QuantCryptError>
Sourcepub fn get_public_key(&self) -> Option<&PublicKey>
pub fn get_public_key(&self) -> Option<&PublicKey>
Sourcepub fn is_composite(&self) -> bool
pub fn is_composite(&self) -> bool
Sourcepub fn to_pem(&self) -> Result<String, QuantCryptError>
pub fn to_pem(&self) -> Result<String, QuantCryptError>
Sourcepub fn from_pem(pem: &str) -> Result<Self, QuantCryptError>
pub fn from_pem(pem: &str) -> Result<Self, QuantCryptError>
Sourcepub fn from_der(der: &[u8]) -> Result<Self, QuantCryptError>
pub fn from_der(der: &[u8]) -> Result<Self, QuantCryptError>
Sourcepub fn from_file(path: &str) -> Result<Self, QuantCryptError>
pub fn from_file(path: &str) -> Result<Self, QuantCryptError>
Sourcepub fn to_pem_file(&self, path: &str) -> Result<(), QuantCryptError>
pub fn to_pem_file(&self, path: &str) -> Result<(), QuantCryptError>
Sourcepub fn to_der_file(&self, path: &str) -> Result<(), QuantCryptError>
pub fn to_der_file(&self, path: &str) -> Result<(), QuantCryptError>
Trait Implementations§
Source§impl DynSignatureAlgorithmIdentifier for PrivateKey
impl DynSignatureAlgorithmIdentifier for PrivateKey
Source§fn signature_algorithm_identifier(
&self,
) -> Result<AlgorithmIdentifier<Any>, Error>
fn signature_algorithm_identifier( &self, ) -> Result<AlgorithmIdentifier<Any>, Error>
AlgorithmIdentifier
for the corresponding singature system.Source§impl Keypair for PrivateKey
impl Keypair for PrivateKey
Source§type VerifyingKey = PublicKey
type VerifyingKey = PublicKey
Verifying key type for this keypair.
Source§fn verifying_key(&self) -> <Self as Keypair>::VerifyingKey
fn verifying_key(&self) -> <Self as Keypair>::VerifyingKey
Get the verifying key which can verify signatures produced by the
signing key portion of this keypair.
Auto Trait Implementations§
impl Freeze for PrivateKey
impl RefUnwindSafe for PrivateKey
impl Send for PrivateKey
impl Sync for PrivateKey
impl Unpin for PrivateKey
impl UnwindSafe for PrivateKey
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