[−][src]Struct monero::cryptonote::onetime_key::SubKeyChecker
Helper to check if a One-time sub address public key is related to a view pair
Generate a table of sub keys from a view pair given a major range and a minor range. These precomputed keys are used to check if an output is owned by the root view pair.
Fields
table: HashMap<PublicKey, Index>
Table of public spend keys and their corresponding indexes
keys: &'a ViewPair
The root view pair (v, S)
Implementations
impl<'a> SubKeyChecker<'a>
[src]
pub fn new(keys: &'a ViewPair, major: Range<u32>, minor: Range<u32>) -> Self
[src]
Generate the table of sub spend keys K(S) \in major x minor
from a view pair mapped to
their Sub-address indexes
pub fn check(
&self,
index: usize,
key: &PublicKey,
tx_pubkey: &PublicKey
) -> Option<&Index>
[src]
&self,
index: usize,
key: &PublicKey,
tx_pubkey: &PublicKey
) -> Option<&Index>
Check if an output public key with its associated random tx public key at index i
is in
the table, if found then the output is own by the view pair, otherwise the output might be
own by someone else, or the table migth be too small.
Trait Implementations
impl<'a> Clone for SubKeyChecker<'a>
[src]
fn clone(&self) -> SubKeyChecker<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for SubKeyChecker<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for SubKeyChecker<'a>
impl<'a> Send for SubKeyChecker<'a>
impl<'a> Sync for SubKeyChecker<'a>
impl<'a> Unpin for SubKeyChecker<'a>
impl<'a> UnwindSafe for SubKeyChecker<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,