SHA256 digest generator.
More...
#include <i_sha2_password_common.h>
SHA256 digest generator.
- See also
- Generate_digest
-
Digest_info
◆ SHA256_digest()
sha2_password::SHA256_digest::SHA256_digest |
( |
| ) |
|
SHA256 digest generator constructor.
Initializes digest context and sets status of initialization.
If m_ok is set to false at the end, it indicates a problem in initialization.
◆ ~SHA256_digest()
sha2_password::SHA256_digest::~SHA256_digest |
( |
| ) |
|
|
override |
◆ all_ok()
bool sha2_password::SHA256_digest::all_ok |
( |
| ) |
|
|
inline |
◆ deinit()
void sha2_password::SHA256_digest::deinit |
( |
| ) |
|
|
private |
Release allocated memory for digest context.
◆ init()
void sha2_password::SHA256_digest::init |
( |
| ) |
|
|
private |
Initialize digest context.
- Allocate memory for digest context
- Call initialization function(s)
◆ retrieve_digest()
bool sha2_password::SHA256_digest::retrieve_digest |
( |
unsigned char * |
digest, |
|
|
unsigned int |
length |
|
) |
| |
|
overridevirtual |
Retrieve generated digest.
- Parameters
-
[out] | digest | Digest text |
[in] | length | Length of the digest buffer |
Assumption : memory for digest has been allocated
- Returns
- digest retrieval status
- Return values
-
Implements sha2_password::Generate_digest.
◆ scrub()
void sha2_password::SHA256_digest::scrub |
( |
| ) |
|
|
overridevirtual |
◆ update_digest()
bool sha2_password::SHA256_digest::update_digest |
( |
const void * |
src, |
|
|
unsigned int |
length |
|
) |
| |
|
overridevirtual |
Update digest with plaintext.
- Parameters
-
[in] | src | Plaintext to be added |
[in] | length | Length of the plaintext |
- Returns
- digest update status
- Return values
-
true | Problem updating digest |
false | Success |
Implements sha2_password::Generate_digest.
◆ m_digest
◆ m_ok
bool sha2_password::SHA256_digest::m_ok |
|
private |
◆ md_context
EVP_MD_CTX* sha2_password::SHA256_digest::md_context |
|
private |
The documentation for this class was generated from the following files: