Struct monero::util::key::PrivateKey [−][src]
pub struct PrivateKey { pub scalar: Scalar, }
Expand description
A private key, a valid curve25519 scalar.
Fields
scalar: Scalar
The actual curve25519 scalar.
Implementations
impl PrivateKey
[src]
impl PrivateKey
[src]pub fn from_slice(data: &[u8]) -> Result<PrivateKey, Error>
[src]
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]
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]
impl<'a, 'b> Add<&'b PrivateKey> for &'a PrivateKey
[src]type Output = PrivateKey
type Output = PrivateKey
The resulting type after applying the +
operator.
fn add(self, other: &'b PrivateKey) -> Self::Output
[src]
fn add(self, other: &'b PrivateKey) -> Self::Output
[src]Performs the +
operation. Read more
impl<'b> Add<&'b PrivateKey> for PrivateKey
[src]
impl<'b> Add<&'b PrivateKey> for PrivateKey
[src]type Output = PrivateKey
type Output = PrivateKey
The resulting type after applying the +
operator.
fn add(self, other: &'b PrivateKey) -> Self::Output
[src]
fn add(self, other: &'b PrivateKey) -> Self::Output
[src]Performs the +
operation. Read more
impl<'a> Add<PrivateKey> for &'a PrivateKey
[src]
impl<'a> Add<PrivateKey> for &'a PrivateKey
[src]type Output = PrivateKey
type Output = PrivateKey
The resulting type after applying the +
operator.
fn add(self, other: PrivateKey) -> Self::Output
[src]
fn add(self, other: PrivateKey) -> Self::Output
[src]Performs the +
operation. Read more
impl Add<PrivateKey> for PrivateKey
[src]
impl Add<PrivateKey> for PrivateKey
[src]type Output = PrivateKey
type Output = PrivateKey
The resulting type after applying the +
operator.
fn add(self, other: PrivateKey) -> Self::Output
[src]
fn add(self, other: PrivateKey) -> Self::Output
[src]Performs the +
operation. Read more
impl Clone for PrivateKey
[src]
impl Clone for PrivateKey
[src]fn clone(&self) -> PrivateKey
[src]
fn clone(&self) -> PrivateKey
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for PrivateKey
[src]
impl Debug for PrivateKey
[src]impl Decodable for PrivateKey
[src]
impl Decodable for PrivateKey
[src]fn consensus_decode<D: Read>(d: &mut D) -> Result<PrivateKey, Error>
[src]
fn consensus_decode<D: Read>(d: &mut D) -> Result<PrivateKey, Error>
[src]Decode an object with a well-defined format.
impl Display for PrivateKey
[src]
impl Display for PrivateKey
[src]impl Encodable for PrivateKey
[src]
impl Encodable for PrivateKey
[src]impl FromStr for PrivateKey
[src]
impl FromStr for PrivateKey
[src]impl Index<RangeFull> for PrivateKey
[src]
impl Index<RangeFull> for PrivateKey
[src]impl<'b> Mul<&'b PrivateKey> for PublicKey
[src]
impl<'b> Mul<&'b PrivateKey> for PublicKey
[src]impl<'b> Mul<&'b PublicKey> for PrivateKey
[src]
impl<'b> Mul<&'b PublicKey> for PrivateKey
[src]impl<'a, 'b> Mul<&'b PublicKey> for &'a PrivateKey
[src]
impl<'a, 'b> Mul<&'b PublicKey> for &'a PrivateKey
[src]impl Mul<PrivateKey> for PrivateKey
[src]
impl Mul<PrivateKey> for PrivateKey
[src]type Output = PrivateKey
type Output = PrivateKey
The resulting type after applying the *
operator.
fn mul(self, other: PrivateKey) -> Self::Output
[src]
fn mul(self, other: PrivateKey) -> Self::Output
[src]Performs the *
operation. Read more
impl Mul<u8> for PrivateKey
[src]
impl Mul<u8> for PrivateKey
[src]impl PartialEq<PrivateKey> for PrivateKey
[src]
impl PartialEq<PrivateKey> for PrivateKey
[src]fn eq(&self, other: &PrivateKey) -> bool
[src]
fn eq(&self, other: &PrivateKey) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &PrivateKey) -> bool
[src]
fn ne(&self, other: &PrivateKey) -> bool
[src]This method tests for !=
.
impl StrictDecode for PrivateKey
[src]
impl StrictDecode for PrivateKey
[src]strict_encoding_support
only.impl StrictEncode for PrivateKey
[src]
impl StrictEncode for PrivateKey
[src]strict_encoding_support
only.impl Copy for PrivateKey
[src]
impl Eq for PrivateKey
[src]
impl StructuralEq for PrivateKey
[src]
impl StructuralPartialEq for PrivateKey
[src]
Auto Trait Implementations
impl RefUnwindSafe for PrivateKey
impl Send for PrivateKey
impl Sync for PrivateKey
impl Unpin for PrivateKey
impl UnwindSafe for PrivateKey
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more