Struct vodozemac::Curve25519PublicKey
source · [−]pub struct Curve25519PublicKey { /* private fields */ }
Expand description
Struct representing a Curve25519 public key.
Implementations
sourceimpl Curve25519PublicKey
impl Curve25519PublicKey
sourcepub fn to_vec(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn to_vec(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Convert the public key to a vector of bytes.
sourcepub fn from_bytes(bytes: [u8; 32]) -> Self
pub fn from_bytes(bytes: [u8; 32]) -> Self
Create a Curve25519PublicKey
from a byte array.
sourcepub fn from_base64(base64_key: &str) -> Result<Curve25519PublicKey, KeyError>
pub fn from_base64(base64_key: &str) -> Result<Curve25519PublicKey, KeyError>
Instantiate a Curve25519 public key from an unpadded base64 representation.
sourcepub fn from_slice(slice: &[u8]) -> Result<Curve25519PublicKey, KeyError>
pub fn from_slice(slice: &[u8]) -> Result<Curve25519PublicKey, KeyError>
Try to create a Curve25519PublicKey
from a slice of bytes.
Trait Implementations
sourceimpl AsRef<Curve25519PublicKey> for RatchetPublicKey
impl AsRef<Curve25519PublicKey> for RatchetPublicKey
sourcefn as_ref(&self) -> &Curve25519PublicKey
fn as_ref(&self) -> &Curve25519PublicKey
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl Clone for Curve25519PublicKey
impl Clone for Curve25519PublicKey
sourcefn clone(&self) -> Curve25519PublicKey
fn clone(&self) -> Curve25519PublicKey
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 more
sourceimpl Debug for Curve25519PublicKey
impl Debug for Curve25519PublicKey
sourceimpl<'de> Deserialize<'de> for Curve25519PublicKey
impl<'de> Deserialize<'de> for Curve25519PublicKey
sourcefn 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
sourceimpl<'a> From<&'a EphemeralSecret> for Curve25519PublicKey
impl<'a> From<&'a EphemeralSecret> for Curve25519PublicKey
sourcefn from(secret: &'a EphemeralSecret) -> Curve25519PublicKey
fn from(secret: &'a EphemeralSecret) -> Curve25519PublicKey
Converts to this type from the input type.
sourceimpl<'a> From<&'a ReusableSecret> for Curve25519PublicKey
impl<'a> From<&'a ReusableSecret> for Curve25519PublicKey
sourcefn from(secret: &'a ReusableSecret) -> Curve25519PublicKey
fn from(secret: &'a ReusableSecret) -> Curve25519PublicKey
Converts to this type from the input type.
sourceimpl Hash for Curve25519PublicKey
impl Hash for Curve25519PublicKey
sourceimpl PartialEq<Curve25519PublicKey> for Curve25519PublicKey
impl PartialEq<Curve25519PublicKey> for Curve25519PublicKey
sourcefn eq(&self, other: &Curve25519PublicKey) -> bool
fn eq(&self, other: &Curve25519PublicKey) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &Curve25519PublicKey) -> bool
fn ne(&self, other: &Curve25519PublicKey) -> bool
This method tests for !=
.
sourceimpl Serialize for Curve25519PublicKey
impl Serialize for Curve25519PublicKey
impl Copy for Curve25519PublicKey
impl Eq for Curve25519PublicKey
impl StructuralEq for Curve25519PublicKey
impl StructuralPartialEq for Curve25519PublicKey
Auto Trait Implementations
impl RefUnwindSafe for Curve25519PublicKey
impl Send for Curve25519PublicKey
impl Sync for Curve25519PublicKey
impl Unpin for Curve25519PublicKey
impl UnwindSafe for Curve25519PublicKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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