Thanks Xor-el, according to your code,I use HashLib4Pascal calculate the HMAC value.
But for the result HMAC value,it's all characters in it are capital.
My result:
0F231777BD4525B250CFAD3B1A9FF539B07C3B1A4690C0EB236E73FB72D42D10166BEAF5C00E34E0A1C6B6D52CBDBAD1BA1B1760DB4E5E2677B7B09CEDBDA981
When I compare the value on line(
https://www.freeformatter.com/hmac-generator.html), all characters are lower case.
Result online:
0f231777bd4525b250cfad3b1a9ff539b07c3b1a4690c0eb236e73fb72d42d10166beaf5c00e34e0a1c6b6d52cbdbad1ba1b1760db4e5e2677b7b09cedbda981
Which one is correct?How can I do for the code?
Because after HMAC,I'll do base64 encode, capital and lower case letter will get different result.
Can you help me for this?
TDC_hashclasses are defined in DCPcrypt library.
another alternative is this
If you use Lazarus 1.6 and above / FPC 3.0.0 and above
then download this library at
https://github.com/Xor-el/HashLib4Pascal
locate "HashLib4PascalPackage.lpk" in the "Packages" folder of the Library.
Open it and add it to your project.
below is a simple console program calculating the HMAC specified in your post using the library above.
Enjoy.