Struct vodozemac::Curve25519PublicKey
source · pub struct Curve25519PublicKey { /* private fields */ }
Expand description
Struct representing a Curve25519 public key.
Implementations§
source§impl Curve25519PublicKey
impl Curve25519PublicKey
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(input: &str) -> Result<Curve25519PublicKey, KeyError>
pub fn from_base64(input: &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§
source§impl AsRef<Curve25519PublicKey> for RatchetPublicKey
impl AsRef<Curve25519PublicKey> for RatchetPublicKey
source§fn as_ref(&self) -> &Curve25519PublicKey
fn as_ref(&self) -> &Curve25519PublicKey
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for Curve25519PublicKey
impl Clone for Curve25519PublicKey
source§fn clone(&self) -> Curve25519PublicKey
fn clone(&self) -> Curve25519PublicKey
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Curve25519PublicKey
impl Debug for Curve25519PublicKey
source§impl Decode for Curve25519PublicKey
impl Decode for Curve25519PublicKey
source§fn decode(reader: &mut impl Read) -> Result<Self, DecodeError>
fn decode(reader: &mut impl Read) -> Result<Self, DecodeError>
Try to read and decode a value from the given reader.
source§fn decode_from_slice(buffer: &[u8]) -> Result<Self, DecodeError>where
Self: Sized,
fn decode_from_slice(buffer: &[u8]) -> Result<Self, DecodeError>where
Self: Sized,
Try to read and decode a value from the given byte slice.
source§impl<'de> Deserialize<'de> for Curve25519PublicKey
impl<'de> Deserialize<'de> for Curve25519PublicKey
source§fn 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
source§impl Display for Curve25519PublicKey
impl Display for Curve25519PublicKey
source§impl<'a> From<&'a Curve25519SecretKey> for Curve25519PublicKey
impl<'a> From<&'a Curve25519SecretKey> for Curve25519PublicKey
source§fn from(secret: &'a Curve25519SecretKey) -> Curve25519PublicKey
fn from(secret: &'a Curve25519SecretKey) -> Curve25519PublicKey
Converts to this type from the input type.
source§impl<'a> From<&'a EphemeralSecret> for Curve25519PublicKey
impl<'a> From<&'a EphemeralSecret> for Curve25519PublicKey
source§fn from(secret: &'a EphemeralSecret) -> Curve25519PublicKey
fn from(secret: &'a EphemeralSecret) -> Curve25519PublicKey
Converts to this type from the input type.
source§impl<'a> From<&'a ReusableSecret> for Curve25519PublicKey
impl<'a> From<&'a ReusableSecret> for Curve25519PublicKey
source§fn from(secret: &'a ReusableSecret) -> Curve25519PublicKey
fn from(secret: &'a ReusableSecret) -> Curve25519PublicKey
Converts to this type from the input type.
source§impl From<Curve25519PublicKey> for PkEncryption
impl From<Curve25519PublicKey> for PkEncryption
source§fn from(public_key: Curve25519PublicKey) -> Self
fn from(public_key: Curve25519PublicKey) -> Self
Converts to this type from the input type.
source§impl Hash for Curve25519PublicKey
impl Hash for Curve25519PublicKey
source§impl PartialEq for Curve25519PublicKey
impl PartialEq for Curve25519PublicKey
source§fn 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 ==
.source§impl Serialize for Curve25519PublicKey
impl Serialize for Curve25519PublicKey
impl Copy for Curve25519PublicKey
impl Eq for Curve25519PublicKey
impl StructuralPartialEq for Curve25519PublicKey
Auto Trait Implementations§
impl Freeze for Curve25519PublicKey
impl RefUnwindSafe for Curve25519PublicKey
impl Send for Curve25519PublicKey
impl Sync for Curve25519PublicKey
impl Unpin for Curve25519PublicKey
impl UnwindSafe for Curve25519PublicKey
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)