Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Function for generating the API signature for Vaultoro's API -
defmodule Vaultoro do
@doc """
secret = The Vaultoro secret generated along with your API key
endpoint = The full URL that you are requesting (with all params) e.g:
def signature(secret, endpoint) do
:crypto.hmac(:sha256, secret, endpoint)
|> Base.encode16(case: :lower)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment