Scramble generator Responsible for generating scramble of following format: XOR(SHA2(m_src), SHA2(SHA2(SHA2(m_src)), m_rnd))
More...
#include <i_sha2_password_common.h>
Scramble generator Responsible for generating scramble of following format: XOR(SHA2(m_src), SHA2(SHA2(SHA2(m_src)), m_rnd))
- See also
- SHA256_digest
-
Digest_info
◆ Generate_scramble()
Generate_scramble constructor.
- Parameters
-
[in] | source | Plaintext source |
[in] | rnd | Salt |
[in] | digest_type | Digest type |
◆ ~Generate_scramble()
sha2_password::Generate_scramble::~Generate_scramble |
( |
| ) |
|
Generate_scramble destructor.
◆ scramble()
bool sha2_password::Generate_scramble::scramble |
( |
unsigned char * |
scramble, |
|
|
unsigned int |
scramble_length |
|
) |
| |
Scramble generation.
- Parameters
-
[out] | scramble | Output buffer for generated scramble |
[in] | scramble_length | Size of scramble buffer |
- Note
- SHA2(src) => digest_stage1 SHA2(digest_stage1) => digest_stage2 SHA2(digest_stage2, m_rnd) => scramble_stage1 XOR(digest_stage1, scramble_stage1) => scramble
- Returns
- Status of scramble generation
- Return values
-
true | Error generating scramble |
false | Success |
◆ m_digest_generator
◆ m_digest_length
unsigned int sha2_password::Generate_scramble::m_digest_length |
|
private |
◆ m_digest_type
Digest_info sha2_password::Generate_scramble::m_digest_type |
|
private |
◆ m_rnd
std::string sha2_password::Generate_scramble::m_rnd |
|
private |
◆ m_src
std::string sha2_password::Generate_scramble::m_src |
|
private |
The documentation for this class was generated from the following files: