Sorry, to answer your question, the CBC is more secure, and the initvector is basically a piece of data to start the encryption chain because of the way CBC works by using a previous segment of data to encrypt the next.. so you would create a piece of data.. consider it like a password.. if you try to decrypt with the wrong init vector.. then you get garbage.<br>
<br><div class="gmail_quote">On Fri, Oct 24, 2008 at 12:58 PM, Robert martin <span dir="ltr">&lt;<a href="mailto:rob@chreos.co.nz">rob@chreos.co.nz</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Kyley<br>
<br>
Just having a look at this now. &nbsp;Which mode do you use, wiki says &#39;ECB&#39;<br>
might not be the safest although doesn&#39;t mention &#39;CBC&#39; mode.<br>
<br>
looking at<br>
<br>
procedure EncryptAESStreamCBC(Source: TStream; Count: cardinal;<br>
 &nbsp;const Key: TAESKey256; const InitVector: TAESBuffer; Dest: TStream);<br>
overload;<br>
<br>
What is InitVector used for???<br>
<br>
Sorry about any dumb questions. &nbsp;I am by no means an expert on this!<br>
<br>
Thanks<br>
Rob<br>
<br>
<br>
<br>
Kyley Harris wrote:<br>
&gt; Also, when I said &quot;I have one&quot; i didn&#39;t mean its mine.. copyright is<br>
&gt; in the header.. it works well and easy to use.<br>
&gt;<br>
&gt; On Thu, Oct 23, 2008 at 5:23 PM, Robert martin &lt;<a href="mailto:rob@chreos.co.nz">rob@chreos.co.nz</a><br>
&gt; &lt;mailto:<a href="mailto:rob@chreos.co.nz">rob@chreos.co.nz</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt; &nbsp; &nbsp; Hi<br>
&gt;<br>
&gt; &nbsp; &nbsp; I have a file I want to FTP to a site. &nbsp;I want this file to be<br>
&gt; &nbsp; &nbsp; physically encrypted with something reasonably strong. &nbsp;Does any body<br>
&gt; &nbsp; &nbsp; have some code / web pointer to a site that doesn&#39;t require extra<br>
&gt; &nbsp; &nbsp; components or dlls to do it. &nbsp;I did a search on AES encryption and<br>
&gt; &nbsp; &nbsp; found<br>
&gt; &nbsp; &nbsp; lots of sites but most want me to use their components. &nbsp;I just want<br>
&gt; &nbsp; &nbsp; some code !<br>
&gt;<br>
&gt; &nbsp; &nbsp; Thanks<br>
&gt; &nbsp; &nbsp; Rob<br>
&gt; &nbsp; &nbsp; _______________________________________________<br>
&gt; &nbsp; &nbsp; NZ Borland Developers Group - Delphi mailing list<br>
&gt; &nbsp; &nbsp; Post: <a href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a> &lt;mailto:<a href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a>&gt;<br>
&gt; &nbsp; &nbsp; Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
&gt; &nbsp; &nbsp; Unsubscribe: send an email to <a href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a><br>
&gt; &nbsp; &nbsp; &lt;mailto:<a href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a>&gt; with Subject: unsubscribe<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Kyley Harris<br>
&gt; Harris Software<br>
&gt; +64-21-671-821<br>
&gt; ------------------------------------------------------------------------<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; NZ Borland Developers Group - Delphi mailing list<br>
&gt; Post: <a href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a><br>
&gt; Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
&gt; Unsubscribe: send an email to <a href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe<br>
_______________________________________________<br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a><br>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
Unsubscribe: send an email to <a href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe<br>
</blockquote></div><br><br clear="all"><br>-- <br>Kyley Harris<br>Harris Software<br>+64-21-671-821<br>