Struct monero::util::key::PrivateKey [−][src]
pub struct PrivateKey { pub scalar: Scalar, }
A private key, a valid curve25519 scalar.
Fields
scalar: Scalar
The actual curve25519 scalar.
Implementations
impl PrivateKey
[src]
impl PrivateKey
[src]pub fn as_bytes(&self) -> &[u8]
[src]
Serialize the private key as bytes.
pub fn to_bytes(&self) -> [u8; 32]
[src]
Serialize the private 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]
impl<'a, 'b> Add<&'b PrivateKey> for &'a PrivateKey
[src]type Output = PrivateKey
The resulting type after applying the +
operator.
fn add(self, other: &'b PrivateKey) -> Self::Output
[src]
impl<'b> Add<&'b PrivateKey> for PrivateKey
[src]
impl<'b> Add<&'b PrivateKey> for PrivateKey
[src]type Output = PrivateKey
The resulting type after applying the +
operator.
fn add(self, other: &'b PrivateKey) -> Self::Output
[src]
impl<'a> Add<PrivateKey> for &'a PrivateKey
[src]
impl<'a> Add<PrivateKey> for &'a PrivateKey
[src]type Output = PrivateKey
The resulting type after applying the +
operator.
fn add(self, other: PrivateKey) -> Self::Output
[src]
impl Add<PrivateKey> for PrivateKey
[src]
impl Add<PrivateKey> for PrivateKey
[src]type Output = PrivateKey
The resulting type after applying the +
operator.
fn add(self, other: PrivateKey) -> Self::Output
[src]
impl Clone for PrivateKey
[src]
impl Clone for PrivateKey
[src]fn clone(&self) -> PrivateKey
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for PrivateKey
[src]
impl Copy 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]
impl Encodable for PrivateKey
[src]
impl Encodable for PrivateKey
[src]impl Eq for PrivateKey
[src]
impl Eq 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
The resulting type after applying the *
operator.
fn mul(self, other: PrivateKey) -> Self::Output
[src]
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 ne(&self, other: &PrivateKey) -> bool
[src]
impl StrictDecode for PrivateKey
[src]
impl StrictDecode for PrivateKey
[src]This is supported on crate feature
strict_encoding_support
only.impl StrictEncode for PrivateKey
[src]
impl StrictEncode for PrivateKey
[src]This is supported on crate feature
strict_encoding_support
only.impl StructuralEq for PrivateKey
[src]
impl StructuralEq for PrivateKey
[src]impl StructuralPartialEq for PrivateKey
[src]
impl StructuralPartialEq for PrivateKey
[src]Auto Trait Implementations
impl RefUnwindSafe for PrivateKey
impl RefUnwindSafe for PrivateKey
impl Send for PrivateKey
impl Send for PrivateKey
impl Sync for PrivateKey
impl Sync for PrivateKey
impl Unpin for PrivateKey
impl Unpin for PrivateKey
impl UnwindSafe for PrivateKey
impl UnwindSafe for PrivateKey