From 80f1e1ce67332a82f03e092b6b2396b0834efad9 Mon Sep 17 00:00:00 2001 From: manzerbredes Date: Thu, 12 Mar 2015 20:59:12 +0400 Subject: [PATCH] Checking comments --- CryptClass/HASHCrypt.cpp | 53 +++++++++++++++++++++++----------------- CryptClass/HASHCrypt.hpp | 26 ++++++++++++-------- 2 files changed, 46 insertions(+), 33 deletions(-) diff --git a/CryptClass/HASHCrypt.cpp b/CryptClass/HASHCrypt.cpp index cd0dab6..eed9cb5 100644 --- a/CryptClass/HASHCrypt.cpp +++ b/CryptClass/HASHCrypt.cpp @@ -8,13 +8,12 @@ * */ + //----- class ----- #include "HASHCrypt.hpp" - - //Constructor HASHCrypt::HASHCrypt(){ } @@ -25,6 +24,7 @@ HASHCrypt::~HASHCrypt(){ +//Contruct MD5 over 128 bits and put it into digest void HASHCrypt::getMD5_128(std::string chain, byte* digest, int size){ //Digest size controller @@ -37,6 +37,8 @@ void HASHCrypt::getMD5_128(std::string chain, byte* digest, int size){ } + +//Contruct SHA-256 and put it into digest void HASHCrypt::getSHA_256(std::string chain, byte* digest, int size){ //Digest size controller @@ -50,27 +52,6 @@ void HASHCrypt::getSHA_256(std::string chain, byte* digest, int size){ } -//Check the size of the digest -void HASHCrypt::checkDigestSize(int sizeRequired, int size){ - try{ - if(size !=sizeRequired){ - throw this->getInvalidDigestSizeError(sizeRequired, size); - } - - } - catch(std::string erreur){ - std::cerr << erreur <getInvalidDigestSizeError(sizeRequired, size); + } + + } + catch(std::string erreur){ + std::cerr << erreur <