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]) -> Self
pub fn from_str(public_key: &str, secret_key: &str) -> Result<Self, CryptoError>
sourcepub fn new() -> Self
pub fn new() -> Self
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
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