Struct prople_crypto::eddsa::privkey::PrivKey
source · pub struct PrivKey { /* private fields */ }Expand description
PrivKey is a private key generated from SigningKey
This object also able to serialize and encode the private key into PEM format
Once this object encoded into PEM, we also able to encrypt the data and generate KeySecure
object from it through trait ToKeySecure.
Implementations§
source§impl PrivKey
impl PrivKey
pub fn new(key: SigningKey) -> Self
pub fn serialize(&self) -> EdDSAPrivKeyBytes
pub fn to_pem(&self) -> Result<String, EddsaError>
Trait Implementations§
source§impl ToKeySecure for PrivKey
impl ToKeySecure for PrivKey
fn to_keysecure(&self, password: String) -> Result<KeySecure, KeySecureError>
Auto Trait Implementations§
impl Freeze for PrivKey
impl RefUnwindSafe for PrivKey
impl Send for PrivKey
impl Sync for PrivKey
impl Unpin for PrivKey
impl UnwindSafe for PrivKey
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