iota.lib.cpp
IOTA C++ Library
All Classes Namespaces Functions Variables
Public Member Functions | List of all members
IOTA::Crypto::IPow Class Referenceabstract

#include <i_pow.hpp>

Inheritance diagram for IOTA::Crypto::IPow:
IOTA::Crypto::Pow

Public Member Functions

 IPow ()=default
 
virtual ~IPow ()=default
 
virtual Types::Trytes operator() (const Types::Trytes &trytes, int minWeightMagnitude, int threads=0)=0
 

Detailed Description

Interface for proof of work algorithms.

Constructor & Destructor Documentation

◆ IPow()

IOTA::Crypto::IPow::IPow ( )
default

Default ctor.

◆ ~IPow()

virtual IOTA::Crypto::IPow::~IPow ( )
virtualdefault

Default dtor.

Member Function Documentation

◆ operator()()

virtual Types::Trytes IOTA::Crypto::IPow::operator() ( const Types::Trytes &  trytes,
int  minWeightMagnitude,
int  threads = 0 
)
pure virtual

Compute nonce from the given trytes.

Parameters
trytesThe trytes to compute nonce from.
minWeightMagnitudeThe minimum number of zeroes the hash has to end with.
threadsThe number of thread to run the algorithm to.
Returns
The nonce.

Implemented in IOTA::Crypto::Pow.


The documentation for this class was generated from the following file: