Recently I had to implement HMAC SHA1 using Elixir. It’s pretty simple in Python. Here’s the code in Python3.
I wanted to do the same, but couldn’t find any resource so I went into the Erlang’s
crypto module and it has a
hmac/3 function which does the same. This is how we can use the erlang module to create a HMAC SHA1 in Elixir.
hmac/3 you can also pass
sha512 for different alogorithms. Erlang’s
crypto module is awesome and also pretty powerful. This is where, I very much like Elixir and Erlang’s interoperability.