|
|
|
|
|
|
|
|
|
|
|
|
|
|
void TokenMatrix::Validate(std::string& SecurityKey) { // Decrypts and validates the matrix. |
|
|
void TokenMatrix::Validate(std::string& SecurityKey) { // Decrypts and validates the matrix. |
|
|
|
|
|
|
|
|
cd::MANGLER ValidationChecker; // Create a mangler engine for validation. |
|
|
|
|
|
|
|
|
cd::Mangler ValidationChecker; // Create a mangler engine for validation. |
|
|
|
|
|
|
|
|
// In order to do the validation we must look at the token matrix as a sequence of bytes. |
|
|
// In order to do the validation we must look at the token matrix as a sequence of bytes. |
|
|
// We will be decrypting the first and last SecurtySegmentSize of this sequence and then |
|
|
// We will be decrypting the first and last SecurtySegmentSize of this sequence and then |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void TokenMatrix::Verify(std::string& SecurityKey) { // Builds and verifies a file digest. |
|
|
void TokenMatrix::Verify(std::string& SecurityKey) { // Builds and verifies a file digest. |
|
|
|
|
|
|
|
|
cd::MANGLER DigestChecker; // Create a mangler for the digest. |
|
|
|
|
|
|
|
|
cd::Mangler DigestChecker; // Create a mangler for the digest. |
|
|
|
|
|
|
|
|
// Gain access to our token matrix as bytes. |
|
|
// Gain access to our token matrix as bytes. |
|
|
|
|
|
|