SIde-Channel Analysis toolKit (SICAK)
Software toolkit for side-channel analysis
|
This header file contains function templates for loading/storing defined types. More...
#include <fstream>
#include <string>
#include "types_basic.hpp"
#include "types_power.hpp"
#include "types_stat.hpp"
#include "exceptions.hpp"
#include <iostream>
Go to the source code of this file.
Functions | |
std::fstream | openOutFile (const char *filename) |
Opens filestream for writing. | |
std::fstream | openInFile (const char *filename) |
Opens filestream for reading. | |
void | closeFile (std::fstream &fs) |
Flushes and closes the filestream. | |
template<class T > | |
void | fillArrayFromFile (std::fstream &fs, ArrayType< T > &arr) |
Fills array from file, based on the given Array's size. | |
template<class T > | |
Vector< T > | loadPowerTraceFromFile (std::fstream &fs, size_t samplesPerTrace, size_t trace) |
Loads a power trace from file, based on parameters given. | |
template<class T > | |
Vector< T > | loadCorrelationTraceFromFile (std::fstream &fs, size_t samplesPerTrace, size_t noOfCandidates, size_t matrix, size_t candidate) |
Loads a correlation trace from file, based on parameters given. | |
template<class T > | |
Vector< T > | loadTValuesFromFile (std::fstream &fs, size_t samplesPerTrace) |
Loads a t-values trace from file, based on parameters given. | |
template<class T > | |
void | writeArrayToFile (std::fstream &fs, const T *buffer, size_t len) |
Writes array to file. | |
template<class T > | |
void | writeArrayToFile (std::fstream &fs, const ArrayType< T > &arr) |
Writes array to file. | |
template<class T > | |
UnivariateContext< T > | readContextFromFile (std::fstream &fs) |
Reads context from file, based on the context's file format. | |
template<class T > | |
void | writeContextToFile (std::fstream &fs, const UnivariateContext< T > &ctx) |
Writes context to file. | |
This header file contains function templates for loading/storing defined types.