Hi Group,

I am wondering how to reset the Base64 encoder. I'm currently using a
MessageEnd/MessageSeriesEnd:

CryptoPP::Base64Encoder base64;

  for x = 1 to 3 {

    base64.Put( "Test", 4 );

    base64.MessageEnd();
    base64.MessageSeriesEnd();

    UINT size = base.MaxRetrievable();

    BYTE* temp = new BYTE[ size + 1];
    temp[ size ] = '\0';

    base64.Get( temp, size );

  }

The first time through, I get a 'VGVzdA==' (with LF). After the first round,
MaxRetrievable() returns 0.

Put(...) always returns 0 (even for the first round).

Removing MessageSeriesEnd() has no effect.


Thanks,
Jeff

Reply via email to