Porting node.js encryption function to Elixir

What an incredible answer. Thanks so much for helping and teaching me a thing or two along the way.