Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calling openssl from x64 application
#5
Hello again,

Thanks, that did it, after allocating the key through EVP_PKEY_new() the call to EVP_PKEY_set1_RSA succeeded. 

Why I choose this path?
I have little knowledge on this subject and when I needed this hash function I could not find any samples that pointed me in the right direction. I tried several Delphi alternatives but they did not give the right results. I did find a working C# example a decided to convert it to Delphi.

Maybe you can help out here?

If I do this:

  ih := TIdHMACSHA1.Create;
  ih.Key := IndyTextEncoding_8Bit.GetBytes(clean_key);
  indy_buf := ih.HashValue(IndyTextEncoding_8Bit.GetBytes(AData));
  indy_hash := TNetEncoding.Base64.EncodeBytesToString(indy_buf);

this hash value is calculated: 'SFYyolkv4nUPbzKoFOmHuPaDQE4='

The hash value should be: 
'jSXIuYXqNb23f0RHybCpYWlzNAfABN1ie2hGPA7Cj0svoXX2sLaTZdTt11nb8DieULXivftOzxKDPkWjGiJJQsxUaPpltsfYOCg/jSeNEo+clfRpIP3K4UGXDjCQNwV+WNCkggA9S87oEylUBPOdShibOAC1oMocAO/B9SOZm/o='

What is causing this difference? Do I need to setup some additional parameters?

Thanks Kees
Reply


Messages In This Thread
Calling openssl from x64 application - by KeesVer - 05-16-2019, 12:13 PM
RE: Calling openssl from x64 application - by KeesVer - 05-22-2019, 06:53 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)