Hi all, I have a problem.
Someone I know encrypted a text file using AES128 by using binary key file, (He generate the binary key). After that he uses "base64Encode" over the encryped file I have the private binary key file. Now, when I'm trying to decrypt the file, I do as follow: 1. Use "Base64Decoder" to get the encrypted file --> Pass successfully 2. Use the following: [B]Try using both functions:[/B] [QUOTE]FileSource f(in, true, new DefaultDecryptorWithMAC(passPhrase, new FileSink(out)));[/QUOTE] [QUOTE]FileSource f(in, true, new DefaultDecryptor(passPhrase, new FileSink(out)));[/QUOTE] where: in - is the input file (encrypted file) passPharse - char* - location of the key file [B]but I always getting the following error:[/B] [QUOTE] terminate called after throwing an instance of 'CryptoPP::DefaultDecryptor::KeyBadErr' what(): DefaultDecryptor: cannot decrypt message with this passphrase[/QUOTE] [B]Now when I'm trying to encrypt and decrypt by myself it works fine, (I'm using the binary key he gave me)[/B] [QUOTE]1. FileSource f(in, true, new DefaultEncryptorWithMAC (passPhrase, new FileSink(out))); 2. FileSource(in, true, new Base64Encoder(new FileSink(out))); 3. FileSource(in, true, new Base64Decoder(new FileSink(out))); 4. FileSource f(in, true, new DefaultDecryptorWithMAC(passPhrase, new FileSink(out)));[/QUOTE] Could anyone help me, to understand what is my problem, I'm guessing that the problem could be from 2 reasons: 1. Because this is a different algorithm form java AES128 2. There is a problem in the key, It can't read it right --~--~---------~--~----~------------~-------~--~----~ 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. -~----------~----~----~----~------~----~------~--~---
