Fastest path to Lua SHA256 RFC-2104 compliant HMAC signature?
-
12-09-2019 - |
Question
I'm running Debian Linux, and for a Lua script I need to create a SHA256 checksum to authenticate requests to Amazon Web Services. They don't say for sure but it looks as if they may want a base64 encoding of the resulting SHA256 checksum.
- I'd be happy if someone had done a Lua binding.
- I'd be content if someone could help me figure out how to use the command-line
/usr/bin/sha256sum
for this purpose. - I'd settle for a pointer to C code and deal with the hassle of the binding and the base64 encoding myself.
I surely don't need to reimplement SHA256 for myself; if someone has an implementation in ANSI standard C that they like, please let me know. Or a better solution!
Solution
How about LuaCrypto, a front-end for OpenSSL:
OTHER TIPS
It looks like mushclient has already written a Lua wrapper for a SHA-256 library.
A work-around might be the free signing service at http://apisigning.com/
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow