iota.lib.cpp
IOTA C++ Library
Public Member Functions | List of all members
IOTA::Crypto::Pow Class Reference

#include <pow.hpp>

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

Public Member Functions

 Pow ()=default
 
virtual ~Pow ()=default
 
Types::Trytes operator() (const Types::Trytes &trytes, int minWeightMagnitude, int threads=0) override
 
- Public Member Functions inherited from IOTA::Crypto::IPow
 IPow ()=default
 
virtual ~IPow ()=default
 

Detailed Description

Proof of work algorithm base on PearlDiver.

Constructor & Destructor Documentation

◆ Pow()

IOTA::Crypto::Pow::Pow ( )
default

Default ctor.

◆ ~Pow()

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

Default dtor.

Member Function Documentation

◆ operator()()

Types::Trytes IOTA::Crypto::Pow::operator() ( const Types::Trytes &  trytes,
int  minWeightMagnitude,
int  threads = 0 
)
overridevirtual

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.

Implements IOTA::Crypto::IPow.


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