TAESEncryption Decrypt string is blank?

Using Delphi 10.2.3
Win32 Compiling

Latest Crypto Pack as of today.

AESEncryption.DecryptFileW seems to work with what I have.

AESEncryption.Decrypt to do same data via A string, returns a blank string. No error.

I made a small routine to do this and this works, using the DecryptStream and TStringStreams....

function DecryptString(s: string; aes: TAESEncryption): string;
  stream1, stream2: TStringStream;
  stream1 := TStringStream.Create;
  stream1.Position := 0;
  stream2 := TStringStream.Create;
  aes.DecryptStream(stream1, TStream(stream2));
  Result := stream2.DataString;
  eStr : String;
  dStr : String;
  AESEncryption := TAESEncryption.Create(nil);
  AESEncryption.AType := atCBC;
  AESEncryption.IVMode := userdefined;
  AESEncryption.keyLength := kl256;
  AESEncryption.IV := HexToString(strIVHex);
  AESEncryption.key := HexToString(strKeyHex);
  AESEncryption.Unicode := TUnicode.noUni;
  AESEncryption.paddingMode := PKCS7; 
  AESEncryption.outputFormat := raw;
  eStr := tfile.ReadAllText(inputFIle, tencoding.ANSI);
  dStr := DecryptString(eStr, AESEncryption); // <-- my flavor using string streams
  // dStr := AESEncryption.Decrypt(eStr); // <---- this won't work. dSTR is blank. reported to TMS.
  Memo2.text := dStr;

I will eventually not get a file, but a dump of the AES-256-CBC data from a stored procedure call.
And need to decrypt it on the fly.

My DecryptString call works, but wondering if this is a bug or am I missing something?

Hi Steve,
You should use either
EncryptFileW / DecryptFileW
or EncryptStream / DecryptStream
for files/streams.

from my original post

So when the stored proc is done, from system I have to talk to, they will be giving me the same exact data that was in the file.

So my initial tests right now is file, I tried making a version to work via String usage. As ill be getting the same data as a string that was inside my "test" file.

So in my tests above, I wanted the contents of the file, inside a string var, to then decrypt that string var. ala, simulate how I'll be getting it and storing it eventually soon.