Struct eznacl::EncryptionKey
source · [−]pub struct EncryptionKey { /* private fields */ }
Expand description
A Curve25519 encryption key
Implementations
sourceimpl EncryptionKey
impl EncryptionKey
sourcepub fn from(pubkey: &CryptoString) -> Result<EncryptionKey, EzNaclError>
pub fn from(pubkey: &CryptoString) -> Result<EncryptionKey, EzNaclError>
Creates a new EncryptionKey from a CryptoString object
sourcepub fn from_string(pubstr: &str) -> Result<EncryptionKey, EzNaclError>
pub fn from_string(pubstr: &str) -> Result<EncryptionKey, EzNaclError>
Creates a new EncryptionKey from a string containing CryptoString-formatted data
Trait Implementations
sourceimpl Clone for EncryptionKey
impl Clone for EncryptionKey
sourcefn clone(&self) -> EncryptionKey
fn clone(&self) -> EncryptionKey
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl CryptoInfo for EncryptionKey
impl CryptoInfo for EncryptionKey
sourceimpl Debug for EncryptionKey
impl Debug for EncryptionKey
sourceimpl Encryptor for EncryptionKey
impl Encryptor for EncryptionKey
sourcefn encrypt(&self, data: &[u8]) -> Result<CryptoString, EzNaclError>
fn encrypt(&self, data: &[u8]) -> Result<CryptoString, EzNaclError>
Encrypts the provided data using the Curve25519 algorithm. Note that this is slower than symmetric encryption and should be used only on small data sets.
sourceimpl PartialEq<EncryptionKey> for EncryptionKey
impl PartialEq<EncryptionKey> for EncryptionKey
sourcefn eq(&self, other: &EncryptionKey) -> bool
fn eq(&self, other: &EncryptionKey) -> bool
sourceimpl PartialOrd<EncryptionKey> for EncryptionKey
impl PartialOrd<EncryptionKey> for EncryptionKey
sourcefn partial_cmp(&self, other: &EncryptionKey) -> Option<Ordering>
fn partial_cmp(&self, other: &EncryptionKey) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl PublicKey for EncryptionKey
impl PublicKey for EncryptionKey
sourcefn get_public_key(&self) -> CryptoString
fn get_public_key(&self) -> CryptoString
Returns the public key as a CryptoString object
sourcefn get_public_str(&self) -> String
fn get_public_str(&self) -> String
Returns the public key as a string
impl StructuralPartialEq for EncryptionKey
Auto Trait Implementations
impl RefUnwindSafe for EncryptionKey
impl Send for EncryptionKey
impl Sync for EncryptionKey
impl Unpin for EncryptionKey
impl UnwindSafe for EncryptionKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more