![]() |
AnCH Framework
0.1
Another C++ Hack Framework
|
#include <sha2.hpp>
Public Member Functions | |
SHA2 () | |
virtual | ~SHA2 () |
virtual const std::array< uint8_t, O > & | digest () const override |
![]() | |
template<class CharT , class Traits , class Allocator > | |
const std::array< uint8_t, O > & | digest (const std::basic_string< CharT, Traits, Allocator > &data) |
template<std::size_t N> | |
const std::array< uint8_t, O > & | digest (const std::array< uint8_t, N > &data) |
const std::array< uint8_t, O > & | digest (const uint8_t *data, std::size_t len) |
template<class CharT , class Traits > | |
const std::array< uint8_t, O > & | digest (std::basic_istream< CharT, Traits > &stream) |
Static Protected Member Functions | |
static constexpr W | shiftRight (uint8_t bits, W word) |
static constexpr W | rotateLeft (uint8_t bits, W word) |
static constexpr W | rotateRight (uint8_t bits, W word) |
Additional Inherited Members | |
![]() | |
static constexpr std::size_t | getOutputSize () |
static constexpr std::size_t | getBlockSize () |
SHA2 abstract class.
SHA2 contains algorithms for SHA224/256/384/512.
The children have to define the translation array and the sigma transformation functions.
The template parameters are:
SHA224/256/384/512 are implemented in this library.
|
inline |
SHA2 default constructor
|
inlinevirtual |
SHA2 destructor
|
inlineoverridevirtual |
|
inlinestaticprotected |
Rotate n bits word from n bits to left
bits | the number of bits to rotate |
word | the n bits word to rotate |
|
inlinestaticprotected |
Rotate n bits word from n bits to right
bits | the number of bits to rotate |
word | the n bits word to rotate |
|
inlinestaticprotected |
Shift n bits word from n bits to right
bits | the number of bits to shift |
word | the n bits word to shift |