geral2 / SQL-APIConsumer

Database Project with generic procedures to consume API through GET/POST methods.
MIT License
141 stars 48 forks source link

TSQL: Sign an API request in TSQL with signature encrypted with HMAC-sha256 and encoded by base64 #56

Open bierfust opened 2 years ago

bierfust commented 2 years ago

I would like to sign an API request in TSQL. The signature should be encrypted with HMAC-sha256 and be encoded by base64. The end result should be the signature stored in a variable. I hope you can help me out. Many thanks.

Key = 12aee25d-63d1-49ad-a83b-1fb9a0dc1334 String to sign = 1665925038934GET/api/v1/accounts

Desired output Output Base64: Zh45s4j9EmRoKZEmjWZ3wp46ROTIOK6DNt4ifQ1ZuX0=

https://www.devglan.com/online-tools/hmac-sha256-online

geral2 commented 2 years ago

Hello @bierfust ,

I'll be checking this. I'll let you know.