pub struct PublicKey(/* private fields */);
Available on crate feature
x25519
only.Methods from Deref<Target = PublicKey>§
pub const BYTES: usize = 32usize
Sourcepub fn clear_cofactor(&self) -> Result<[u8; 32], Error>
pub fn clear_cofactor(&self) -> Result<[u8; 32], Error>
Multiply a point by the cofactor, returning an error if the element is in a small-order group.
Trait Implementations§
Source§impl EcPk for PublicKey
impl EcPk for PublicKey
const COMPRESSED_LEN: usize = 32usize
const CURVE_NAME: &'static str = "Curve25519"
type Compressed = [u8; 32]
fn base_point() -> Self
fn to_pk_compressed(&self) -> Self::Compressed
fn from_pk_compressed(pk: Self::Compressed) -> Result<Self, EcPkInvalid>
fn from_pk_compressed_slice(slice: &[u8]) -> Result<Self, EcPkInvalid>
Source§impl MultiDisplay<Encoding> for PublicKey
impl MultiDisplay<Encoding> for PublicKey
Source§impl Ord for PublicKey
impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
impl PartialOrd for PublicKey
Source§impl Wrapper for PublicKey
impl Wrapper for PublicKey
Source§fn from_inner(inner: Self::Inner) -> Self
fn from_inner(inner: Self::Inner) -> Self
Instantiates wrapper type with the inner data
Source§fn as_inner(&self) -> &Self::Inner
fn as_inner(&self) -> &Self::Inner
Returns reference to the inner representation for the wrapper type
Source§fn into_inner(self) -> Self::Inner
fn into_inner(self) -> Self::Inner
Unwraps the wrapper returning the inner type
impl Copy for PublicKey
impl Eq for PublicKey
impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
impl Freeze for PublicKey
impl RefUnwindSafe for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl Unpin 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