F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
Utils::Hash Class Reference

A generic interface for creating and comparing hash values. More...

#include <Utils/Hash/Hash.hpp>

Public Member Functions

 Hash ()
 
 ~Hash ()
 
void init ()
 
void setHashValue (HashBuffer &value)
 
void update (const void *const data, const NATIVE_INT_TYPE len)
 
void final (HashBuffer &buffer)
 
void final (U32 &hashvalue)
 

Static Public Member Functions

static void hash (const void *data, const NATIVE_INT_TYPE len, HashBuffer &buffer)
 
static const char * getFileExtensionString ()
 
static void addFileExtension (const Fw::StringBase &baseName, Fw::StringBase &extendedName)
 
static NATIVE_UINT_TYPE getFileExtensionLength ()
 

Detailed Description

A generic interface for creating and comparing hash values.

Definition at line 24 of file Hash.hpp.

Constructor & Destructor Documentation

◆ Hash()

Utils::Hash::Hash ( )

Construct a Hash object

Definition at line 17 of file CRC32.cpp.

◆ ~Hash()

Utils::Hash::~Hash ( )

Destroy a Hash object

Definition at line 23 of file CRC32.cpp.

Member Function Documentation

◆ addFileExtension()

void Utils::Hash::addFileExtension ( const Fw::StringBase baseName,
Fw::StringBase extendedName 
)
static

Add the extension for the supported hash type

Parameters
baseNameThe base name
extendedNameThe extended name

Definition at line 11 of file HashCommon.cpp.

◆ final() [1/2]

void Utils::Hash::final ( HashBuffer buffer)

Finalize an incremental computation and return the result

Parameters
bufferThe result

Definition at line 63 of file CRC32.cpp.

◆ final() [2/2]

void Utils::Hash::final ( U32 &  hashvalue)

Finalize an incremental computation and return the result

Definition at line 73 of file CRC32.cpp.

◆ getFileExtensionLength()

NATIVE_UINT_TYPE Utils::Hash::getFileExtensionLength ( )
static

Get the length of the file extension string

Definition at line 19 of file HashCommon.cpp.

◆ getFileExtensionString()

const char * Utils::Hash::getFileExtensionString ( )
static

Get the file extension for the supported hash type E.g., could return "SHA256"

Definition at line 5 of file HashCommon.cpp.

◆ hash()

void Utils::Hash::hash ( const void *  data,
const NATIVE_INT_TYPE  len,
HashBuffer buffer 
)
static

Create a hash value all at once from raw data

Parameters
datapointer to start of data
lenlength of the data
bufferfilled with resulting hash value

Definition at line 28 of file CRC32.cpp.

◆ init()

void Utils::Hash::init ( )

Initialize a Hash object for incremental hash computation

Definition at line 46 of file CRC32.cpp.

◆ setHashValue()

void Utils::Hash::setHashValue ( HashBuffer value)

Set hash value to specified value

Parameters
valueHash value

Definition at line 81 of file CRC32.cpp.

◆ update()

void Utils::Hash::update ( const void *const  data,
const NATIVE_INT_TYPE  len 
)

Update an incremental computation with new data

Parameters
datapointer to start of data to add to hash calculation
lenlength of data to add to hash calculation

Definition at line 52 of file CRC32.cpp.


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