Struct monero::util::key::PrivateKey
source · pub struct PrivateKey {
pub scalar: Scalar,
}
Expand description
A private key, a valid curve25519 scalar.
Fields§
§scalar: Scalar
The actual curve25519 scalar.
Implementations§
source§impl PrivateKey
impl PrivateKey
sourcepub fn from_slice(data: &[u8]) -> Result<PrivateKey, Error>
pub fn from_slice(data: &[u8]) -> Result<PrivateKey, Error>
Deserialize a private key from a slice.
sourcepub fn from_scalar(scalar: Scalar) -> PrivateKey
pub fn from_scalar(scalar: Scalar) -> PrivateKey
Create a secret key from a raw curve25519 scalar.
Trait Implementations§
source§impl<'a, 'b> Add<&'b PrivateKey> for &'a PrivateKey
impl<'a, 'b> Add<&'b PrivateKey> for &'a PrivateKey
§type Output = PrivateKey
type Output = PrivateKey
The resulting type after applying the
+
operator.source§impl<'b> Add<&'b PrivateKey> for PrivateKey
impl<'b> Add<&'b PrivateKey> for PrivateKey
§type Output = PrivateKey
type Output = PrivateKey
The resulting type after applying the
+
operator.source§impl<'a> Add<PrivateKey> for &'a PrivateKey
impl<'a> Add<PrivateKey> for &'a PrivateKey
§type Output = PrivateKey
type Output = PrivateKey
The resulting type after applying the
+
operator.source§impl Add<PrivateKey> for PrivateKey
impl Add<PrivateKey> for PrivateKey
§type Output = PrivateKey
type Output = PrivateKey
The resulting type after applying the
+
operator.source§impl Clone for PrivateKey
impl Clone for PrivateKey
source§fn clone(&self) -> PrivateKey
fn clone(&self) -> PrivateKey
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PrivateKey
impl Debug for PrivateKey
source§impl Decodable for PrivateKey
impl Decodable for PrivateKey
source§fn consensus_decode<R: Read + ?Sized>(r: &mut R) -> Result<PrivateKey, Error>
fn consensus_decode<R: Read + ?Sized>(r: &mut R) -> Result<PrivateKey, Error>
Decode an object with a well-defined format.
source§impl Display for PrivateKey
impl Display for PrivateKey
source§impl Encodable for PrivateKey
impl Encodable for PrivateKey
source§impl FromStr for PrivateKey
impl FromStr for PrivateKey
source§impl Hash for PrivateKey
impl Hash for PrivateKey
source§impl Index<RangeFull> for PrivateKey
impl Index<RangeFull> for PrivateKey
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 Mul<PrivateKey> for PrivateKey
impl Mul<PrivateKey> for PrivateKey
§type Output = PrivateKey
type Output = PrivateKey
The resulting type after applying the
*
operator.source§impl Mul<u8> for PrivateKey
impl Mul<u8> for PrivateKey
source§impl PartialEq<PrivateKey> for PrivateKey
impl PartialEq<PrivateKey> for PrivateKey
source§fn eq(&self, other: &PrivateKey) -> bool
fn eq(&self, other: &PrivateKey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.