Hi kazuhiko,

> FileSource((std::istream &)inStream, true, decryptor); //here!
> but it works when the input size is less than 16.
Buffering may be causing you issues. Perhaps it would be easier to
prototype your code with strings:

StringSource( plainText, true,
  new StreamTransformationFilter(
    Encryptor,
    new StringSink( cipherText )
  ) // StreamTransformationFilter
); // StringSource

With strings working, then attempt to isolate the istream issue. I
can't speak about Borland, but I know Microsoft streams have some
interesting side effects at times.

Jeff

On Sun, Jun 8, 2008 at 4:28 PM, kazuhiko <[EMAIL PROTECTED]> wrote:
>
> 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);
> };
>
> [SNIP]

--~--~---------~--~----~------------~-------~--~----~
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.
-~----------~----~----~----~------~----~------~--~---

Reply via email to