From b000c165f218e77d4377852f308eb8955459c074 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Thu, 17 Jun 2021 11:56:37 -0400 Subject: [PATCH] Upgrade crypto calls to new functions --- lib/shopifex/plug.ex | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/shopifex/plug.ex b/lib/shopifex/plug.ex index 2d17d93..a4012a0 100644 --- a/lib/shopifex/plug.ex +++ b/lib/shopifex/plug.ex @@ -100,7 +100,8 @@ defmodule Shopifex.Plug do |> Enum.filter(&(!is_nil(&1))) |> Enum.join("&") - :crypto.hmac( + :crypto.mac( + :hmac, :sha256, Application.fetch_env!(:shopifex, :secret), query_string @@ -110,7 +111,8 @@ defmodule Shopifex.Plug do end def build_hmac(%Plug.Conn{method: "POST"} = conn) do - :crypto.hmac( + :crypto.mac( + :hmac, :sha256, Application.fetch_env!(:shopifex, :secret), conn.assigns[:raw_body]