On Wed, Jan 2, 2013 at 1:26 PM, Jaroslaw Staniek <span dir="ltr"><<a href="mailto:staniek@kde.org" target="_blank">staniek@kde.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello Marijn,<br>
There are impementation-dependent casts from uchar to char:<br></blockquote><div>Ah yes, that is indeed not good.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Since this is your code, could you point me what are these values?<br></blockquote><div>I assume I copied these values from whatever document documents the encryption ms office uses... Not sure what the nicest way is to hardcode binary data in c++ source code... "\xfe\xa7\xd2\x76\x3b\x4b\x9e\x79" might work, but has the downside that there is a trailing 0 byte that should not be included in the qbytearray. Signed char constants seem ugly, since QByteArray expects regular char, not signed char (although I guess it would be safe, since the signed->unsigned underflowing conversion is defined unlike this unsigned->signed overflow).</div>
<div><br></div><div>Marijn</div></div><br>