pub struct PublicKey {
pub point: CompressedEdwardsY,
}
Expand description
A public key, a valid edward point on the curve.
Fields
point: CompressedEdwardsY
The actual Ed25519 point.
Implementations
sourceimpl PublicKey
impl PublicKey
sourcepub fn as_bytes(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl<'_> Write for &mut [u8]impl<'_> Read for &[u8]
pub fn as_bytes(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl<'_> Write for &mut [u8]impl<'_> Read for &[u8]
Serialize a public key as bytes.
sourcepub fn from_slice(data: &[u8]) -> Result<PublicKey, Error>
pub fn from_slice(data: &[u8]) -> Result<PublicKey, Error>
Deserialize a public key from a slice.
sourcepub fn from_private_key(privkey: &PrivateKey) -> PublicKey
pub fn from_private_key(privkey: &PrivateKey) -> PublicKey
Generate a public key from the private key.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for PublicKey
impl<'de> Deserialize<'de> for PublicKey
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 Hashable for PublicKey
impl Hashable for PublicKey
sourcefn hash_to_scalar(&self) -> PrivateKey
fn hash_to_scalar(&self) -> PrivateKey
sourceimpl<'b> Mul<&'b PrivateKey> for PublicKey
impl<'b> Mul<&'b PrivateKey> for PublicKey
sourceimpl<'b> Mul<&'b PublicKey> for PrivateKey
impl<'b> Mul<&'b PublicKey> for PrivateKey
sourceimpl<'a, 'b> Mul<&'b PublicKey> for &'a PrivateKey
impl<'a, 'b> Mul<&'b PublicKey> for &'a PrivateKey
impl Copy for PublicKey
impl Eq for PublicKey
impl StructuralEq for PublicKey
impl StructuralPartialEq for PublicKey
Auto Trait Implementations
impl RefUnwindSafe for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl Unpin for PublicKey
impl UnwindSafe for PublicKey
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