KeccakTools

ReverseStateIterator Class Reference

#include <Keccak-fPropagation.h>

List of all members.

Public Member Functions

 ReverseStateIterator (const vector< SliceValue > &stateAfterChi, const KeccakFPropagation &DCorLC, unsigned int aMaxWeight=0)
bool isEnd () const
bool isEmpty () const
void operator++ ()
const vector< SliceValue > & operator* () const
unsigned int getCurrentWeight () const

Detailed Description

This class implements an iterator over the possible state values before χ given a state after χ.


Constructor & Destructor Documentation

ReverseStateIterator::ReverseStateIterator ( const vector< SliceValue > &  stateAfterChi,
const KeccakFPropagation DCorLC,
unsigned int  aMaxWeight = 0 
)

This constructor initializes the iterator based on a state value after χ, the KeccakFPropagation instance, which determines the compatible states, and an optional maximum of the propagation weight.

Parameters:
stateAfterChiThe state value after χ as a vector of slices.
DCorLCA reference to the KeccakFPropagation instance that determines the type of propagation.
aMaxWeightThe iterator will run through the states whose propagation weight is not higher than this parameter. If 0, the iterator runs through all the possible states.

Member Function Documentation

unsigned int ReverseStateIterator::getCurrentWeight ( ) const

This method returns the propagation weight of the current state.

Returns:
The weight of the current state.
bool ReverseStateIterator::isEmpty ( ) const

This method tells wether the set of states to run through is empty.

Returns:
It returns true iff there are no states to run through.
bool ReverseStateIterator::isEnd ( ) const

This method tells whether the iterator has reached the end of the possible states.

Returns:
It returns true iff there are no more states to run through.
const vector< SliceValue > & ReverseStateIterator::operator* ( ) const

This method returns a constant reference to the current state.

Returns:
A constant reference to the current state as a vector of slices.
void ReverseStateIterator::operator++ ( )

This method moves the iterator to the next state.


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