KeccakTools

KeccakDisplayInSVG Class Reference

#include <Keccak-fDisplay.h>

List of all members.

Public Member Functions

 KeccakDisplayInSVG ()
void displayState (ostream &fout, const vector< SliceValue > &state, double gOffsetX=0.0, double gOffsetY=0.0, double gScale=1.0) const
void displayStateSparsely (ostream &fout, const vector< SliceValue > &state, double gOffsetX=0.0, double gOffsetY=0.0, double gScale=1.0) const
void displayTrail (ostream &fout, const KeccakFPropagation &DCorLC, const Trail &trail, double x=0.0, double y=0.0, double scale=1.0) const
void displayParity (ostream &fout, const KeccakFPropagation &DCorLC, const vector< RowValue > &C, const vector< RowValue > &D, bool displayRuns=false) const

Public Attributes

bool displayRows
bool displaySlices
int maxNumberOfHorizontalSlices
double bitSize

Protected Member Functions

void displaySlice (ostream &fout, SliceValue slice, unsigned int z, double x=0.0, double y=0.0, double scale=1.0) const
virtual string getAdditionalBitStyles (unsigned int x, unsigned int y, unsigned int z) const

Detailed Description

Class to help display state values in SVG.


Constructor & Destructor Documentation

KeccakDisplayInSVG::KeccakDisplayInSVG ( ) [inline]

The constructor.


Member Function Documentation

void KeccakDisplayInSVG::displayParity ( ostream &  fout,
const KeccakFPropagation DCorLC,
const vector< RowValue > &  C,
const vector< RowValue > &  D,
bool  displayRuns = false 
) const

Display the parity and parity effect of a state.

void KeccakDisplayInSVG::displaySlice ( ostream &  fout,
SliceValue  slice,
unsigned int  z,
double  x = 0.0,
double  y = 0.0,
double  scale = 1.0 
) const [protected]
void KeccakDisplayInSVG::displayState ( ostream &  fout,
const vector< SliceValue > &  state,
double  gOffsetX = 0.0,
double  gOffsetY = 0.0,
double  gScale = 1.0 
) const

Output SVG code for a state with given value. Each slice is displayed and is offset by (0.4, -0.3)*bitSize units.

void KeccakDisplayInSVG::displayStateSparsely ( ostream &  fout,
const vector< SliceValue > &  state,
double  gOffsetX = 0.0,
double  gOffsetY = 0.0,
double  gScale = 1.0 
) const

Output SVG code for a state with given value. Each non-zero slice is displayed side by side, up to maxNumberOfHorizontalSlices on the same row.

void KeccakDisplayInSVG::displayTrail ( ostream &  fout,
const KeccakFPropagation DCorLC,
const Trail trail,
double  x = 0.0,
double  y = 0.0,
double  scale = 1.0 
) const

Display a trail using displayStateSparsely().

string KeccakDisplayInSVG::getAdditionalBitStyles ( unsigned int  x,
unsigned int  y,
unsigned int  z 
) const [protected, virtual]

Member Data Documentation

Size (in the units of the generated SVG file) of an individual bit.

Whether the rows must be also displayed on top of individual bits.

Whether the slices must be also displayed on top of individual bits or rows.

When displaying several slices, this attribute tells how many slices can be displayed together side by side.


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