My project needs to connect the Azure Cosmo DB by REST API.
The Azure Cosmo DB connection requires to pass a HMACSHA256 signature to
the HTTP header. I tried to use THashSHA2.GetHMAC(Data, Key) function to get
this signature. But when I compare the result with the signature I take from C# code
(the example code in Azure webpage), they are not the same. In the C# code I saw
it converts the key to Base64String before calculating the signature.
Should I do the same step in Delphi? How to do it? Do anyone have the experience
doing the Azure Cosmo DB signature calculation?
The Azure Cosmo DB connection requires to pass a HMACSHA256 signature to
the HTTP header. I tried to use THashSHA2.GetHMAC(Data, Key) function to get
this signature. But when I compare the result with the signature I take from C# code
(the example code in Azure webpage), they are not the same. In the C# code I saw
it converts the key to Base64String before calculating the signature.
Should I do the same step in Delphi? How to do it? Do anyone have the experience
doing the Azure Cosmo DB signature calculation?