<div dir="ltr">You are right about the MD5 stuff.<div>I have 2 different methods, one is the THash which is in System.Hash and one that part of teh OverByte ICS code.</div><div>They both return 2 diff. hash's !! agh...</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 16, 2016 at 11:06 AM, Jolyon Direnko-Smith <span dir="ltr"><<a href="mailto:jsmith@deltics.co.nz" target="_blank">jsmith@deltics.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Just one correction:<br><br>Array of Char = Array of AnsiChar<br><br>One other thing to watch out for is if you have methods which accept strings as untyped buffers. Passing a "String" to these methods will not convert them to ANSIString, so the method receives a buffer of WIDEChars. Also watch out for TStringStreams and any assumptions about the encoding of the string in that case.<br><br>Ultimately a lot will depend on the API for whatever MD5 library you are employing and how you pass strings into that API. MD5 works on bytes, not chars so it won't necessarily be trying to take account of "sane" conversions between string types (again, depending on the library you are using).<div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On 16 November 2016 at 10:00, Jeremy Coulter <span dir="ltr"><<a href="mailto:jscoulter@gmail.com" target="_blank">jscoulter@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">HI all.<div>I have a Delphi 2007 application that I NEED to upgrade to Delphi XE 8 or greater.</div><div>The problem is, I am having trouble converting the code due to the fact that Embarcadero changed how "String" etc. is used when they added the support for Unicode.</div><div>I have had a couple of cracks at the conversion and I am "close" on one project but I am starting again because I want to make sure I am using the right variable types and not guessing.</div><div>There is a bit of MD5 conversion going on and the different variable types of course generated diff MD5 codes for the same string being converted and it is a bit confusing :-)</div><div><br></div><div>The main variable types are:</div><div><br></div><div>String</div><div>Byte</div><div>Integer</div><div>LongInt</div><div>Pointer</div><div>Array of Char</div><div>PChar</div><div>Char</div><div><br></div><div>My understanding is the variables should now be :-</div><div><span style="background-color:rgb(255,0,0)"><br></span></div><div><div><font color="#ff0000" style="background-color:rgb(243,243,243)">String = AnsiString?</font></div><div><font color="#ff0000">Byte = Still Byte?</font></div><div>Integer = Still Integer</div><div>LongInt =Still LongInt</div><div>Pointer = Still Pointer</div><div><font color="#ff0000">Array of Char = PAnsiCHAR ?</font></div><div><font color="#ff0000">PChar = PAnsiChar?</font></div><div><font color="#ff0000">Char = AnsiChar?</font></div></div><div><font color="#ff0000"><br></font></div><div><font color="#000000">Am I correct with the above that I have highlighted in "Red" ??</font></div><div><font color="#000000"><br></font></div><div><font color="#000000">Thanks, Jeremy</font></div><div><br></div></div>
<br></div></div>______________________________<wbr>_________________<span class=""><br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a href="mailto:delphi@listserver.123.net.nz" target="_blank">delphi@listserver.123.net.nz</a><br>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" rel="noreferrer" target="_blank">http://delphi.org.nz/mailman/l<wbr>istinfo/delphi</a><br>
Unsubscribe: send an email to <a href="mailto:delphi-request@listserver.123.net.nz" target="_blank">delphi-request@listserver.123.<wbr>net.nz</a> with Subject: unsubscribe<br></span></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a><br>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" rel="noreferrer" target="_blank">http://delphi.org.nz/mailman/<wbr>listinfo/delphi</a><br>
Unsubscribe: send an email to <a href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.<wbr>net.nz</a> with Subject: unsubscribe<br></blockquote></div><br></div>