Scramble validator Expects scramble to be: XOR(SHA2(m_src), SHA2(SHA2(SHA2(m_src)), m_rnd)) Validates it against: SHA2(SHA2(m_src)) and random string.
More...
#include <i_sha2_password_common.h>
Scramble validator Expects scramble to be: XOR(SHA2(m_src), SHA2(SHA2(SHA2(m_src)), m_rnd)) Validates it against: SHA2(SHA2(m_src)) and random string.
- See also
- Generate_scramble
-
SHA256_digest
-
Digest_info
◆ Validate_scramble()
sha2_password::Validate_scramble::Validate_scramble |
( |
const unsigned char * |
scramble, |
|
|
const unsigned char * |
known, |
|
|
const unsigned char * |
rnd, |
|
|
unsigned int |
rnd_length, |
|
|
Digest_info |
digest_type = Digest_info::SHA256_DIGEST |
|
) |
| |
Validate scramble constructor.
- Parameters
-
[in] | scramble | Scramble to be validated |
[in] | known | Known digest against which scramble is to be verified |
[in] | rnd | Salt |
[in] | rnd_length | Length of the salt buffer |
[in] | digest_type | Type od digest |
◆ ~Validate_scramble()
sha2_password::Validate_scramble::~Validate_scramble |
( |
| ) |
|
Validate_scramble destructor.
◆ validate()
bool sha2_password::Validate_scramble::validate |
( |
| ) |
|
Validate the scramble.
- Note
- SHA2(known, rnd) => scramble_stage1 XOR(scramble, scramble_stage1) => digest_stage1 SHA2(digest_stage1) => digest_stage2 m_known == digest_stage2
- Returns
- Result of validation process
- Return values
-
false | Successful validation |
true | Error |
◆ m_digest_generator
◆ m_digest_length
unsigned int sha2_password::Validate_scramble::m_digest_length |
|
private |
◆ m_digest_type
Digest_info sha2_password::Validate_scramble::m_digest_type |
|
private |
◆ m_known
const unsigned char* sha2_password::Validate_scramble::m_known |
|
private |
SHA2(SHA2(plaintext_password))
◆ m_rnd
const unsigned char* sha2_password::Validate_scramble::m_rnd |
|
private |
◆ m_rnd_length
unsigned int sha2_password::Validate_scramble::m_rnd_length |
|
private |
◆ m_scramble
const unsigned char* sha2_password::Validate_scramble::m_scramble |
|
private |
The documentation for this class was generated from the following files: