I'm new in Crypto++, and I need to make some manipulations with my strings and ints (call a hash function and MAC function)
I saw this Using Crypto++ to generate random hashes with SHA1 and tried to follow it.
I made new project, compiled cryptolibs, linked them (I think, correctly, because there is no linker errors). It built good, but on return from main I have this:
DEBUG ASSERTION FAILED! ...blablabla/dbgdel.cpp Line 52
Expression: _Block_Type_Is_Valid(pHead->nBlockUse) ...
I made it like at those post in comments, so i don't understand, why it happens.
code (includes are like addresses because i was really lazy to make good links at linker):
#include <C:\Users\esselesse\Documents\Visual Studio 2010\Projects\InfoProtect_Biometrics_Auth_Algorithm\InfoProtect_Biometrics_Auth_Algorithm\LIB\sha.h>
#include <C:\Users\esselesse\Documents\Visual Studio 2010\Projects\InfoProtect_Biometrics_Auth_Algorithm\InfoProtect_Biometrics_Auth_Algorithm\LIB\filters.h>
#include <C:\Users\esselesse\Documents\Visual Studio 2010\Projects\InfoProtect_Biometrics_Auth_Algorithm\InfoProtect_Biometrics_Auth_Algorithm\LIB\hex.h>
#include <iostream>
#include <string>
using namespace CryptoPP;
using namespace std;
int main()
{
SHA1 sha1;
string source = "Hello"; //This will be randomly generated somehow
string hash = "";
StringSource(source, true, new HashFilter(sha1, new HexEncoder(new StringSink(hash))));
}