Hi All.
Im using cryptpp 5.5.2
Compiler: Borland(R) C++Builder(R) for Microsoft(R) WindowsTM Version
10.0.2288.42451 Update 2
OS: WindowsXP home sp2
Language: Japanese
The following codes do not work.
void CTR_XEX3_24Encode(std::istream &inStream, std::ofstream
&outStream){
const std::string Key = "abcdefghijklmnopqrstuvwx";
const int KeyLength = 24;
const std::string iv = "12345678";
CTR_Mode<DES_XEX3>::Encryption ctrEncryption((const
byte*)Key.c_str(), KeyLength, (const byte*)iv.c_str());
StreamTransformationFilter *encryptor = new
StreamTransformationFilter(ctrEncryption, new FileSink(outStream));
FileSource((std::istream &)inStream, true, encryptor);
};
void CTR_XEX3_24Decode(std::istream &inStream, std::ofstream
&outStream){
const std::string Key = "abcdefghijklmnopqrstuvwx";
const int KeyLength = 24;
const std::string iv = "12345678";
CTR_Mode<DES_XEX3>::Decryption ctrDecryption((const
byte*)Key.c_str(), KeyLength, (const byte*)iv.c_str());
StreamTransformationFilter *decryptor = new
StreamTransformationFilter(ctrDecryption, new FileSink(outStream));
FileSource((std::istream &)inStream, true, decryptor); //here! but it
works when the input size is less than 16.
};
int main()
{
std::istringstream source("");
std::ifstream inStream;
std::ofstream outStream;
std::string DecodedPath = "c:/dec";
source.str("abcdefghijklmnopqrstuvwxyz");//input size is 26.
outStream.open("c:/enc");
CTR_XEX3_24Encode(source, outStream);
inStream.open("c:/enc");
outStream.close();
outStream.open("c:/dec");
CTR_XEX3_24Decode(inStream, outStream);
}
--~--~---------~--~----~------------~-------~--~----~
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.
-~----------~----~----~----~------~----~------~--~---