<div>Not sure which is best but I used ECB</div>The way I used it was..<div><br></div><div><div> FKey:TAESKey256;</div><div> FDecryptKey: string;</div><div><br></div><div><br></div><div><div> ASource := TStringStream.Create(s);</div>
<div> try</div><div> ADest := TStringStream.Create('');</div><div> try</div><div> ASource.Position := 0;</div><div> Size := Length(s);</div><div> ADest.WriteBuffer(Size,SizeOf(Size));</div><div>
EncryptAESStreamECB(ASource, Size, FKey, ADest);</div><div> ADest.Position := 0;</div><div> s := ADest.DataString;</div><div> finally</div><div> FreeAndNil(ADest);</div><div> end;</div><div> finally</div>
<div> FreeAndNil(ASource);</div><div> end;</div><div><br></div></div><div class="gmail_quote">On Fri, Oct 24, 2008 at 12:58 PM, Robert martin <span dir="ltr"><<a href="mailto:rob@chreos.co.nz">rob@chreos.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 class="Ih2E3d">Hi Kyley<br>
<br>
Just having a look at this now. Which mode do you use, wiki says 'ECB'<br>
might not be the safest although doesn't mention 'CBC' mode.<br>
<br>
looking at<br>
<br>
procedure EncryptAESStreamCBC(Source: TStream; Count: cardinal;<br>
const Key: TAESKey256; const InitVector: TAESBuffer; Dest: TStream);<br>
overload;<br>
<br>
</div>What is InitVector used for / what should I provide here???<br>
<div><div></div><div class="Wj3C7c"><br>
Sorry about any dumb questions. I am by no means an expert on this!<br>
<br>
Thanks<br>
Rob<br>
<br>
<br>
<br>
Kyley Harris wrote:<br>
> Also, when I said "I have one" i didn't mean its mine.. copyright is<br>
> in the header.. it works well and easy to use.<br>
><br>
> On Thu, Oct 23, 2008 at 5:23 PM, Robert martin <<a href="mailto:rob@chreos.co.nz">rob@chreos.co.nz</a><br>
> <mailto:<a href="mailto:rob@chreos.co.nz">rob@chreos.co.nz</a>>> wrote:<br>
><br>
> Hi<br>
><br>
> I have a file I want to FTP to a site. I want this file to be<br>
> physically encrypted with something reasonably strong. Does any body<br>
> have some code / web pointer to a site that doesn't require extra<br>
> components or dlls to do it. I did a search on AES encryption and<br>
> found<br>
> lots of sites but most want me to use their components. I just want<br>
> some code !<br>
><br>
> Thanks<br>
> Rob<br>
> _______________________________________________<br>
> NZ Borland Developers Group - Delphi mailing list<br>
> Post: <a href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a> <mailto:<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><br>
> <mailto:<a href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a>> with Subject: unsubscribe<br>
><br>
><br>
><br>
><br>
> --<br>
> Kyley Harris<br>
> Harris Software<br>
> +64-21-671-821<br>
> ------------------------------------------------------------------------<br>
><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>
_______________________________________________<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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Kyley Harris<br>Harris Software<br>+64-21-671-821<br>
</div>