[][src]Struct monero::util::key::PublicKey

pub struct PublicKey {
    pub point: CompressedEdwardsY,
}

Monero public key

Fields

point: CompressedEdwardsY

The actual Ed25519 point

Methods

impl PublicKey[src]

pub fn as_bytes(&self) -> &[u8][src]

Serialize a public key as bytes

pub fn to_bytes(&self) -> [u8; 32][src]

Serialize a public key to bytes

pub fn from_slice(data: &[u8]) -> Result<PublicKey, Error>[src]

Deserialize a public key from a slice

pub fn from_private_key(privkey: &PrivateKey) -> PublicKey[src]

Generate a public key from the private key

Trait Implementations

impl<S: Encoder> Encodable<S> for PublicKey[src]

impl<D: Decoder> Decodable<D> for PublicKey[src]

impl Hashable for PublicKey[src]

fn hash_to_scalar(&self) -> PrivateKey[src]

Apply hash_to_scalar on itself and return the scalar

impl Eq for PublicKey[src]

impl Copy for PublicKey[src]

impl PartialEq<PublicKey> for PublicKey[src]

impl Clone for PublicKey[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Display for PublicKey[src]

impl Debug for PublicKey[src]

impl<'a, 'b> Add<&'b PublicKey> for &'a PublicKey[src]

type Output = PublicKey

The resulting type after applying the + operator.

impl<'a> Add<PublicKey> for &'a PublicKey[src]

type Output = PublicKey

The resulting type after applying the + operator.

impl<'b> Add<&'b PublicKey> for PublicKey[src]

type Output = PublicKey

The resulting type after applying the + operator.

impl Add<PublicKey> for PublicKey[src]

type Output = PublicKey

The resulting type after applying the + operator.

impl<'a, 'b> Sub<&'b PublicKey> for &'a PublicKey[src]

type Output = PublicKey

The resulting type after applying the - operator.

impl<'a> Sub<PublicKey> for &'a PublicKey[src]

type Output = PublicKey

The resulting type after applying the - operator.

impl<'b> Sub<&'b PublicKey> for PublicKey[src]

type Output = PublicKey

The resulting type after applying the - operator.

impl Sub<PublicKey> for PublicKey[src]

type Output = PublicKey

The resulting type after applying the - operator.

impl<'b> Mul<&'b PublicKey> for PrivateKey[src]

type Output = PublicKey

The resulting type after applying the * operator.

impl<'a, 'b> Mul<&'b PublicKey> for &'a PrivateKey[src]

type Output = PublicKey

The resulting type after applying the * operator.

impl<'b> Mul<&'b PrivateKey> for PublicKey[src]

type Output = PublicKey

The resulting type after applying the * operator.

impl Index<RangeFull> for PublicKey[src]

type Output = [u8]

The returned type after indexing.

impl Hash for PublicKey[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl FromStr for PublicKey[src]

type Err = Error

The associated error which can be returned from parsing.

Auto Trait Implementations

impl Send for PublicKey

impl Sync for PublicKey

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From for T[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Same for T

type Output = T

Should always be Self