Browse Source

MANGLER to Mangler - conformity

master
Pete McNeil 4 years ago
parent
commit
3a4f5ea518
3 changed files with 4 additions and 4 deletions
  1. 1
    1
      snfNETmgr.cpp
  2. 1
    1
      snfNETmgr.hpp
  3. 2
    2
      snf_engine.cpp

+ 1
- 1
snfNETmgr.cpp View File



//--- Prepare the secret. //--- Prepare the secret.


cd::MANGLER ResponseGenerator; // Grab a mangler.
cd::Mangler ResponseGenerator; // Grab a mangler.
for(unsigned int i = 0; i < Secret.length(); i++) // Fill it with the for(unsigned int i = 0; i < Secret.length(); i++) // Fill it with the
ResponseGenerator.Encrypt(Secret.at(i)); // security key. ResponseGenerator.Encrypt(Secret.at(i)); // security key.



+ 1
- 1
snfNETmgr.hpp View File

cd::Timeout SYNCTimer; // SYNC timer. cd::Timeout SYNCTimer; // SYNC timer.


void evolvePad(std::string Entropy = ""); // Add entropy to and evolve. void evolvePad(std::string Entropy = ""); // Add entropy to and evolve.
cd::MANGLER PadGenerator; // Random pad source.
cd::Mangler PadGenerator; // Random pad source.
PadBuffer OneTimePad(int Len = SNFPadSize); // Provides Len bytes of one time pad. PadBuffer OneTimePad(int Len = SNFPadSize); // Provides Len bytes of one time pad.


// Configuration data // Configuration data

+ 2
- 2
snf_engine.cpp View File



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.



Loading…
Cancel
Save