Struct wildland_corex::EncryptingKeypair
source · pub struct EncryptingKeypair {
pub secret: SecretKey,
pub public: PublicKey,
}
Expand description
Keypair that can be used for encryption. See crypto-box crate for details.
Fields§
§secret: SecretKey
§public: PublicKey
Implementations§
source§impl EncryptingKeypair
impl EncryptingKeypair
pub fn from_bytes_slices( pubkey: [u8; 32], seckey: [u8; 32] ) -> EncryptingKeypair
pub fn from_str( public_key: &str, secret_key: &str ) -> Result<EncryptingKeypair, CryptoError>
sourcepub fn new() -> EncryptingKeypair
pub fn new() -> EncryptingKeypair
Creates a randomly generated (non-deterministic) encryption keypair. This keypair can be used as Single-use Transient Encryption Keypair (STEK).
pub fn encode_pub(&self) -> String
Trait Implementations§
source§impl Debug for EncryptingKeypair
impl Debug for EncryptingKeypair
source§impl Default for EncryptingKeypair
impl Default for EncryptingKeypair
source§fn default() -> EncryptingKeypair
fn default() -> EncryptingKeypair
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for EncryptingKeypair
impl Send for EncryptingKeypair
impl Sync for EncryptingKeypair
impl Unpin for EncryptingKeypair
impl UnwindSafe for EncryptingKeypair
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