Thrill
0.1
|
SHA-512 processor without external dependencies.
Definition at line 28 of file sha512.hpp.
#include <sha512.hpp>
Public Member Functions | |
SHA512 () | |
construct empty object. More... | |
SHA512 (const void *data, uint32_t size) | |
construct context and process data range More... | |
SHA512 (const std::string &str) | |
construct context and process string More... | |
std::string | digest () |
finalize computation and return 64 byte (512 bit) digest More... | |
std::string | digest_hex () |
finalize computation and return 64 byte (512 bit) digest hex encoded More... | |
std::string | digest_hex_uc () |
finalize computation and return 64 byte (512 bit) digest upper-case hex More... | |
void | finalize (void *digest) |
finalize computation and output 64 byte (512 bit) digest More... | |
void | process (const void *data, uint32_t size) |
process more data More... | |
void | process (const std::string &str) |
process more data More... | |
Static Public Attributes | |
static constexpr size_t | kDigestLength = 64 |
digest length in bytes More... | |
Private Attributes | |
uint8_t | buf_ [128] |
uint32_t | curlen_ |
uint64_t | length_ |
uint64_t | state_ [8] |
SHA512 | ( | ) |
construct empty object.
Definition at line 146 of file sha512.cpp.
Referenced by tlx::sha512_hex(), and tlx::sha512_hex_uc().
SHA512 | ( | const void * | data, |
uint32_t | size | ||
) |
construct context and process data range
Definition at line 159 of file sha512.cpp.
References SHA512::process().
|
explicit |
construct context and process string
Definition at line 163 of file sha512.cpp.
References SHA512::process().
std::string digest | ( | ) |
finalize computation and return 64 byte (512 bit) digest
Definition at line 239 of file sha512.cpp.
References SHA512::finalize(), and SHA512::kDigestLength.
Referenced by SHA512::digest_hex(), and SHA512::digest_hex_uc().
std::string digest_hex | ( | ) |
finalize computation and return 64 byte (512 bit) digest hex encoded
Definition at line 245 of file sha512.cpp.
References SHA512::digest(), SHA512::finalize(), tlx::hexdump_lc(), and SHA512::kDigestLength.
std::string digest_hex_uc | ( | ) |
finalize computation and return 64 byte (512 bit) digest upper-case hex
Definition at line 251 of file sha512.cpp.
References SHA512::digest(), SHA512::finalize(), tlx::hexdump(), and SHA512::kDigestLength.
void finalize | ( | void * | digest | ) |
finalize computation and output 64 byte (512 bit) digest
Definition at line 205 of file sha512.cpp.
References SHA512::buf_, SHA512::curlen_, SHA512::length_, tlx::digest_detail::sha512_compress(), SHA512::state_, and tlx::digest_detail::store64().
Referenced by SHA512::digest(), SHA512::digest_hex(), and SHA512::digest_hex_uc().
void process | ( | const void * | data, |
uint32_t | size | ||
) |
process more data
Definition at line 167 of file sha512.cpp.
References SHA512::buf_, SHA512::curlen_, SHA512::length_, tlx::digest_detail::min(), tlx::digest_detail::sha512_compress(), and SHA512::state_.
Referenced by SHA512::process(), and SHA512::SHA512().
void process | ( | const std::string & | str | ) |
|
private |
Definition at line 60 of file sha512.hpp.
Referenced by SHA512::finalize(), and SHA512::process().
|
private |
Definition at line 59 of file sha512.hpp.
Referenced by SHA512::finalize(), and SHA512::process().
|
static |
digest length in bytes
Definition at line 44 of file sha512.hpp.
Referenced by SHA512::digest(), SHA512::digest_hex(), and SHA512::digest_hex_uc().
|
private |
Definition at line 57 of file sha512.hpp.
Referenced by SHA512::finalize(), and SHA512::process().
|
private |
Definition at line 58 of file sha512.hpp.
Referenced by SHA512::finalize(), and SHA512::process().