pub struct PublicKey(/* private fields */);Expand description
Bytes that are intended/thought to correspond to a point on the Edwards25519 curve (but not on its twist).
This is more compact than VerifyingKey in memory, and easier to handle,
but it is not guaranteed to be a valid point on the curve, so cannot be used
for actual cryptographic operations such as signature verification or
Diffie-Hellman key exchange.
Implementations§
Source§impl PublicKey
impl PublicKey
pub const fn from_bytes(bytes: PublicKeyBytes) -> Self
pub fn into_inner(self) -> PublicKeyBytes
Trait Implementations§
Source§impl AsRef<PublicKey> for SigningKey
impl AsRef<PublicKey> for SigningKey
Source§impl Borrow<[u8; 32]> for PublicKey
Available on crate feature alloc only.
impl Borrow<[u8; 32]> for PublicKey
Available on crate feature
alloc only.Source§fn borrow(&self) -> &PublicKeyBytes
fn borrow(&self) -> &PublicKeyBytes
Immutably borrows from an owned value. Read more
impl Copy for PublicKey
impl Eq for PublicKey
Source§impl<'a> From<&'a [u8; 32]> for &'a PublicKey
impl<'a> From<&'a [u8; 32]> for &'a PublicKey
Source§fn from(other: &'a PublicKeyBytes) -> Self
fn from(other: &'a PublicKeyBytes) -> Self
Converts to this type from the input type.
Source§impl From<[u8; 32]> for PublicKey
impl From<[u8; 32]> for PublicKey
Source§fn from(bytes: PublicKeyBytes) -> Self
fn from(bytes: PublicKeyBytes) -> Self
Converts to this type from the input type.
Source§impl Ord for PublicKey
impl Ord for PublicKey
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for PublicKey
impl PartialOrd for PublicKey
impl StructuralPartialEq for PublicKey
Source§impl TryFrom<&PublicKey> for VerifyingKey
impl TryFrom<&PublicKey> for VerifyingKey
Auto Trait Implementations§
impl Freeze for PublicKey
impl RefUnwindSafe for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl Unpin for PublicKey
impl UnsafeUnpin for PublicKey
impl UnwindSafe for PublicKey
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