Struct dco3_crypto::PlainUserKeyPairContainer
source · pub struct PlainUserKeyPairContainer {
pub private_key_container: PrivateKeyContainer,
pub public_key_container: PublicKeyContainer,
}
Expand description
Asymmetric plain user keypair container The private key is in plain and can be used for decryption
Fields§
§private_key_container: PrivateKeyContainer
§public_key_container: PublicKeyContainer
Implementations§
source§impl PlainUserKeyPairContainer
impl PlainUserKeyPairContainer
sourcepub fn new(
private_key_pem: String,
public_key_pem: String,
version: UserKeyPairVersion
) -> Self
pub fn new( private_key_pem: String, public_key_pem: String, version: UserKeyPairVersion ) -> Self
Create a new plain user keypair container without private key encryption Accepts private and public key PEM and the desired version (4096 bit is recommended)
sourcepub fn new_from_keypair(
enc_keypair: UserKeyPairContainer,
plain_private_key_pem: &str
) -> Self
pub fn new_from_keypair( enc_keypair: UserKeyPairContainer, plain_private_key_pem: &str ) -> Self
Create a new plain user keypair container without private key encryption Accepts existing encrypted keypair and a plain private key PEM
Trait Implementations§
source§impl Clone for PlainUserKeyPairContainer
impl Clone for PlainUserKeyPairContainer
source§fn clone(&self) -> PlainUserKeyPairContainer
fn clone(&self) -> PlainUserKeyPairContainer
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PlainUserKeyPairContainer
impl Debug for PlainUserKeyPairContainer
source§impl<'de> Deserialize<'de> for PlainUserKeyPairContainer
impl<'de> Deserialize<'de> for PlainUserKeyPairContainer
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PrivateKey for PlainUserKeyPairContainer
impl PrivateKey for PlainUserKeyPairContainer
Returns the private key of a user keypair container as reference
fn get_private_key(&self) -> &PrivateKeyContainer
source§impl PublicKey for PlainUserKeyPairContainer
impl PublicKey for PlainUserKeyPairContainer
Returns only the public key container as reference of a plain user keypair container
fn get_public_key(&self) -> &PublicKeyContainer
Auto Trait Implementations§
impl Freeze for PlainUserKeyPairContainer
impl RefUnwindSafe for PlainUserKeyPairContainer
impl Send for PlainUserKeyPairContainer
impl Sync for PlainUserKeyPairContainer
impl Unpin for PlainUserKeyPairContainer
impl UnwindSafe for PlainUserKeyPairContainer
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