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§
source§impl PublicKey
impl PublicKey
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§
source§impl<'de> Deserialize<'de> for PublicKey
impl<'de> Deserialize<'de> for PublicKey
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 Hashable for PublicKey
impl Hashable for PublicKey
source§fn hash_to_scalar(&self) -> PrivateKey
fn hash_to_scalar(&self) -> PrivateKey
Apply
hash()
on itself and return the interpreted scalar returned by the hash result.source§impl<'b> Mul<&'b PrivateKey> for PublicKey
impl<'b> Mul<&'b PrivateKey> for PublicKey
source§impl<'a, 'b> Mul<&'b PublicKey> for &'a PrivateKey
impl<'a, 'b> Mul<&'b PublicKey> for &'a PrivateKey
source§impl<'b> Mul<&'b PublicKey> for PrivateKey
impl<'b> Mul<&'b PublicKey> for PrivateKey
source§impl PartialEq for PublicKey
impl PartialEq for PublicKey
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