Serialbox  2.2.0
Data serialization library and tools for C/C++, Python and Fortran
serialbox::SHA256 Class Reference

Implementation of the SHA-1 (Secure Hash Algorithm 1) More...

#include <SHA256.h>

Inheritance diagram for serialbox::SHA256:
serialbox::Hash

Public Member Functions

virtual const char * name () const noexcept override
 Get identifier of the hash as used in the HashFactory. More...
 
virtual std::string hash (const void *data, int length) override
 Compute 256 bit hash using SHA-1. More...
 

Static Public Attributes

static const char * Name = "SHA256"
 Identifier of the hash.
 

Detailed Description

Implementation of the SHA-1 (Secure Hash Algorithm 1)

See also
https://en.wikipedia.org/wiki/SHA-1

Definition at line 28 of file SHA256.h.

Member Function Documentation

◆ hash()

std::string serialbox::SHA256::hash ( const void *  data,
int  length 
)
overridevirtual

Compute 256 bit hash using SHA-1.

Parameters
dataBinary data
lengthLenght of the binary data
Returns
SHA-1 hash hex representation as string

Implements serialbox::Hash.

Definition at line 206 of file SHA256.cpp.

◆ name()

virtual const char* serialbox::SHA256::name ( ) const
inlineoverridevirtualnoexcept

Get identifier of the hash as used in the HashFactory.

Returns
Name of the Hash

Implements serialbox::Hash.

Definition at line 36 of file SHA256.h.


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