Просмотр исходного кода

snf_engine.cpp uses codedweller

master
Pete McNeil 4 лет назад
Родитель
Сommit
af0cfa3af7
1 измененных файлов: 4 добавлений и 6 удалений
  1. 4
    6
      snf_engine.cpp

+ 4
- 6
snf_engine.cpp Просмотреть файл

@@ -38,7 +38,7 @@
#include "../CodeDweller/mangler.hpp"
#include "snf_engine.hpp"

namespace codedweller {
namespace cd = codedweller;

///////////////////////////////////////////////////////////////////////////////////////////
// BEGIN IMPLEMENTATIONS //////////////////////////////////////////////////////////////////
@@ -66,7 +66,7 @@ void TokenMatrix::Load(const char* FileName) {

// TokenMatrix::Load(stream)

const AbortCheck CompatibleIntSizeCheck("TokenMatrix::Load():CompatibleIntSizeCheck(sizeof(unsigned int)==4)");
const cd::AbortCheck CompatibleIntSizeCheck("TokenMatrix::Load():CompatibleIntSizeCheck(sizeof(unsigned int)==4)");

void TokenMatrix::Load(std::ifstream& F) { // Initializes the token matrix from a file.
CompatibleIntSizeCheck(sizeof(unsigned int)==4); // Check our assumptions.
@@ -98,7 +98,7 @@ void TokenMatrix::Load(std::ifstream& F) {

void TokenMatrix::Validate(std::string& SecurityKey) { // Decrypts and validates the matrix.

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.
// We will be decrypting the first and last SecurtySegmentSize of this sequence and then
@@ -167,7 +167,7 @@ void TokenMatrix::Validate(std::string& SecurityKey) {

void TokenMatrix::Verify(std::string& SecurityKey) { // Builds and verifies a file digest.

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.

@@ -805,5 +805,3 @@ void EvaluationMatrix::evaluateSegment(std::vector<unsigned char>& data, unsigne
finish = (finish < data.size()) ? finish : data.size();
for(unsigned int a = start; a < finish; a++) EvaluateThis(data[a]);
}

} // End namespace codedweller

Загрузка…
Отмена
Сохранить