Click here to Skip to main content
15,897,291 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Fatal error LNK1103: debugging information corrupt; recompile module Pin
Behzad Ebrahimi24-Jan-05 1:31
Behzad Ebrahimi24-Jan-05 1:31 
QuestionHow to dump NT hashes from local machine? Pin
sfirouza23-Jan-05 1:25
sfirouza23-Jan-05 1:25 
GeneralProblem in calling lapack in Matlab MEX program Pin
tttyip22-Jan-05 23:29
tttyip22-Jan-05 23:29 
GeneralOnHotKey Problem!!! Pin
FreewareFire22-Jan-05 21:56
FreewareFire22-Jan-05 21:56 
GeneralDebug mode in COM ... Pin
omkar joshi22-Jan-05 21:41
omkar joshi22-Jan-05 21:41 
GeneralRe: Debug mode in COM ... Pin
Tim Deveaux23-Jan-05 3:18
Tim Deveaux23-Jan-05 3:18 
Generalencryption...pls help! Pin
mytz22-Jan-05 19:19
mytz22-Jan-05 19:19 
GeneralCrypto++ help Pin
Neville Franks22-Jan-05 16:51
Neville Franks22-Jan-05 16:51 
If there are any Crypto++ V5.x dev's out there I sure could do with some help. I've used V4.x but am having trouble wrapping my head around using V5.x to encrypt and decrypt strings.

In essence I want:

/** Encrypts the specified text and returns same in base64 format.
 *
 *  @param sencryptedb64 returns the encrypted text in base64 format.
 *  @param splaintext text to encrypt.
 *  @param skey encryption key.
 *
 *  @return ???
 */
bool Encrypt( string& sencryptedb64, const string& splaintext, const string&
skey );


and vice-versa.

I've read the Wiki/FAQ and so far have this:

// initialize key and iv here
byte key[AES::DEFAULT_KEYLENGTH], iv[AES::BLOCKSIZE];
memset( key, 0, AES::DEFAULT_KEYLENGTH );
memmove( key, (unsigned char*)skey.c_str(), min( skey.size(), AES::DEFAULT_KEYLENGTH ) );

AutoSeededRandomPool rng;   // Generate an IV
rng.GenerateBlock( iv, AES::BLOCKSIZE );

CFB_Mode<AES >::Encryption cfbEncryption( key, AES::DEFAULT_KEYLENGTH, iv );

string cipher;
StringSink* sink = new StringSink( cipher );
Base64Encoder* base64_enc = new Base64Encoder( sink );
StreamTransformationFilter* aes_enc = new StreamTransformationFilter( cfbEncryption, base64_enc );
StringSource source( splaintext.c_str(), true, aes_enc );


for Encryption, but the cipher result doesn't look right (it ends in a 0x0a) so I suspect I'm off track.

Not sure how to go about Decryption and my attempt so far certainly isn't right.

Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
GeneralResource loading fails in a static library (.lib) Pin
Mr. Accident22-Jan-05 16:45
Mr. Accident22-Jan-05 16:45 
GeneralRe: Resource loading fails in a static library (.lib) Pin
rschuler3-Jun-05 6:46
rschuler3-Jun-05 6:46 
GeneralRe: Resource loading fails in a static library (.lib) Pin
Mr. Accident3-Jun-05 8:47
Mr. Accident3-Jun-05 8:47 
GeneralInno Setup Pin
Anonymous22-Jan-05 16:19
Anonymous22-Jan-05 16:19 
GeneralRe: Inno Setup Pin
Gary R. Wheeler23-Jan-05 3:59
Gary R. Wheeler23-Jan-05 3:59 
GeneralRe: Inno Setup Pin
Anonymous24-Jan-05 4:17
Anonymous24-Jan-05 4:17 
GeneralRe: Inno Setup Pin
Gary R. Wheeler25-Jan-05 12:51
Gary R. Wheeler25-Jan-05 12:51 
Generalpointer range question Pin
nm_11422-Jan-05 15:47
nm_11422-Jan-05 15:47 
GeneralControlling memory leaks Pin
stefane_filion22-Jan-05 9:53
stefane_filion22-Jan-05 9:53 
Generalconst type; Pin
Bo Hunter22-Jan-05 8:15
Bo Hunter22-Jan-05 8:15 
GeneralRe: const type; Pin
Maximilien22-Jan-05 8:48
Maximilien22-Jan-05 8:48 
GeneralRe: const type; Pin
Joaquín M López Muñoz23-Jan-05 4:50
Joaquín M López Muñoz23-Jan-05 4:50 
QuestionHow to idntification device manufacture of pocket pc? Pin
arash47122-Jan-05 7:24
arash47122-Jan-05 7:24 
GeneralSend cookie in HTTP request Pin
dorutzu22-Jan-05 6:32
dorutzu22-Jan-05 6:32 
Questionremove installed programs programmatically? Pin
LukeV22-Jan-05 6:11
LukeV22-Jan-05 6:11 
AnswerRe: remove installed programs programmatically? Pin
ThatsAlok23-Jan-05 18:13
ThatsAlok23-Jan-05 18:13 
GeneralWMA Decoder Source Code Pin
aRtsZ22-Jan-05 5:37
aRtsZ22-Jan-05 5:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.