Hi all,
I wanted to try Randompool with Visual C++ 2008 Express Edition. I am
using Version 5.5.2 of Crypto++.
I checked Codeproject.com and found the following Example:
#pragma once
// Crypto++ Library
#ifdef _DEBUG
# pragma comment ( lib, "cryptlibd" )
#else
# pragma comment ( lib, "cryptlib" )
#endif
// Runtime Library Includes
#include <string>
#include <iostream>
#include <iomanip>
// Crypto++ Include
#include "randpool.h" // PRNG
int main(int argc, char* argv[])
{
const unsigned int SEEDSIZE = 16;
byte pcbSeed[ SEEDSIZE ];
const unsigned int BLOCKSIZE = 16 * 8;
byte pcbScratch[ BLOCKSIZE ];
//Error occurs here//
CryptoPP::RandomPool rng( SEEDSIZE /* Default Ctor: 384 */ );
//---------------------------
rng.Put( pcbSeed, SEEDSIZE );
rng.GenerateBlock( pcbScratch, BLOCKSIZE );
std::cout << "The generated random block is:" << std::endl;
for( unsigned int i = 0; i < BLOCKSIZE; i++ )
{
std::cout << "0x" << std::setbase(16) << std::setw(2) <<
std::setfill('0');
std::cout << static_cast<unsigned int>( pcbScratch[ i ] ) << "
";
}
std::cout << std::endl;
return 0;
}
When i m trying to compile the Code i get the following Error
(translated into english):
error C2664: 'CryptoPP::RandomPool::RandomPool(const
CryptoPP::RandomPool &)': Conversion of the 1.Parameter from 'const
unsigned int' to 'const CryptoPP::RandomPool &' not possible
I have marked the line where the error occurs( as u have probably
already seen )
Does anyone have an idea how to convert this, or how to evade this
Problem?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users"
Google Group.
To unsubscribe, send an email to [EMAIL PROTECTED]
More information about Crypto++ and this group is available at
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---