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

pub struct PrivateKey {
    pub scalar: Scalar,
}

Monero private key

Fields

scalar: Scalar

The actual Ed25519 scalar

Methods

impl PrivateKey[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<PrivateKey, Error>[src]

Deserialize a private key from a slice

pub fn from_scalar(scalar: Scalar) -> PrivateKey[src]

Create a secret key from a raw curve25519 scalar

Trait Implementations

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

type Output = PrivateKey

The resulting type after applying the + operator.

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

type Output = PrivateKey

The resulting type after applying the + operator.

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

type Output = PrivateKey

The resulting type after applying the + operator.

impl Add<PrivateKey> for PrivateKey[src]

type Output = PrivateKey

The resulting type after applying the + operator.

impl Clone for PrivateKey[src]

impl Copy for PrivateKey[src]

impl Debug for PrivateKey[src]

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

impl Display for PrivateKey[src]

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

impl Eq for PrivateKey[src]

impl FromStr for PrivateKey[src]

type Err = Error

The associated error which can be returned from parsing.

impl Index<RangeFull> for PrivateKey[src]

type Output = [u8]

The returned type after indexing.

impl<'b> Mul<&'b PrivateKey> 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 Mul<PrivateKey> for PrivateKey[src]

type Output = PrivateKey

The resulting type after applying the * operator.

impl Mul<u8> for PrivateKey[src]

type Output = PrivateKey

The resulting type after applying the * operator.

impl PartialEq<PrivateKey> for PrivateKey[src]

impl StructuralEq for PrivateKey[src]

impl StructuralPartialEq for PrivateKey[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.