EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Algo AES128 - Invalid Key Material

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
#11392
Posted: 10/19/2009 10:22:31
by David MICHEL (Standard support level)
Joined: 09/23/2009
Posts: 48

I found this solution to save my key :

Code
var
  GenKey : ByteArray;

begin

  ...

  CleTransact.Algorithm := SB_ALGORITHM_CNT_AES128;
  CleTransact.Generate(128);  //128 bits = 16 octets
  GenKey := CleTransact.Key;
  
  fsCleTrans := TFileStream.Create(fichCleTrans,fmCreate);
  try
    ////CleTransact.Save(fsCleTrans);
    fsCleTrans.WriteBuffer(Pointer(GenKey)^,length(GenKey));
  finally
    FreeAndNil(fsCleTrans);
  end;

  ...


Thank.


Sincerely yours,
David MICHEL.

Reply

Statistics

Topic viewed 4986 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!