Not sure which is best but I used ECB
The way I used it was..
    FKey:TAESKey256;
    FDecryptKey: string;


  ASource := TStringStream.Create(s);
  try
    ADest := TStringStream.Create('');
    try
      ASource.Position := 0;
      Size := Length(s);
      ADest.WriteBuffer(Size,SizeOf(Size));
      EncryptAESStreamECB(ASource, Size, FKey, ADest);
      ADest.Position := 0;
      s := ADest.DataString;
    finally
      FreeAndNil(ADest);
    end;
  finally
    FreeAndNil(ASource);
  end;

On Fri, Oct 24, 2008 at 12:58 PM, Robert martin <[EMAIL PROTECTED]> wrote:

> Hi Kyley
>
> Just having a look at this now.  Which mode do you use, wiki says 'ECB'
> might not be the safest although doesn't mention 'CBC' mode.
>
> looking at
>
> procedure EncryptAESStreamCBC(Source: TStream; Count: cardinal;
>  const Key: TAESKey256; const InitVector: TAESBuffer; Dest: TStream);
> overload;
>
> What is InitVector used for / what should I provide here???
>
> Sorry about any dumb questions.  I am by no means an expert on this!
>
> Thanks
> Rob
>
>
>
> Kyley Harris wrote:
> > Also, when I said "I have one" i didn't mean its mine.. copyright is
> > in the header.. it works well and easy to use.
> >
> > On Thu, Oct 23, 2008 at 5:23 PM, Robert martin <[EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]>> wrote:
> >
> >     Hi
> >
> >     I have a file I want to FTP to a site.  I want this file to be
> >     physically encrypted with something reasonably strong.  Does any body
> >     have some code / web pointer to a site that doesn't require extra
> >     components or dlls to do it.  I did a search on AES encryption and
> >     found
> >     lots of sites but most want me to use their components.  I just want
> >     some code !
> >
> >     Thanks
> >     Rob
> >     _______________________________________________
> >     NZ Borland Developers Group - Delphi mailing list
> >     Post: [email protected] <mailto:[email protected]>
> >     Admin: http://delphi.org.nz/mailman/listinfo/delphi
> >     Unsubscribe: send an email to [EMAIL PROTECTED]
> >     <mailto:[EMAIL PROTECTED]> with Subject: unsubscribe
> >
> >
> >
> >
> > --
> > Kyley Harris
> > Harris Software
> > +64-21-671-821
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > NZ Borland Developers Group - Delphi mailing list
> > Post: [email protected]
> > Admin: http://delphi.org.nz/mailman/listinfo/delphi
> > Unsubscribe: send an email to [EMAIL PROTECTED] with Subject:
> unsubscribe
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: [email protected]
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to [EMAIL PROTECTED] with Subject:
> unsubscribe
>



-- 
Kyley Harris
Harris Software
+64-21-671-821
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe

Reply via email to