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.