diff --git a/lib/hex/crypto/public_key.ex b/lib/hex/crypto/public_key.ex deleted file mode 100644 index 401aae2f..00000000 --- a/lib/hex/crypto/public_key.ex +++ /dev/null @@ -1,23 +0,0 @@ -defmodule Hex.Crypto.PublicKey do - @moduledoc false - - def decode!(id, key) do - [rsa_public_key] = :public_key.pem_decode(key) - :public_key.pem_entry_decode(rsa_public_key) - rescue - _ -> - Mix.raise(""" - Could not decode public key for #{id}. The public key contents are shown below. - - #{key} - - Public keys must be valid and be in the PEM format. - """) - end - - def verify(binary, hash, signature, keys, id) do - Enum.any?(keys, fn key -> - :public_key.verify(binary, hash, signature, decode!(id, key)) - end) - end -end