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§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