diff --git a/exercises/practice/affine-cipher/.meta/example.ex b/exercises/practice/affine-cipher/.meta/example.ex index b857c193cb..53c0c9c302 100644 --- a/exercises/practice/affine-cipher/.meta/example.ex +++ b/exercises/practice/affine-cipher/.meta/example.ex @@ -34,7 +34,7 @@ defmodule AffineCipher do @doc """ Decode an encrypted message using a key """ - @spec decode(key :: key(), message :: String.t()) :: {:ok, String.t()} | {:error, String.t()} + @spec decode(key :: key(), encrypted :: String.t()) :: {:ok, String.t()} | {:error, String.t()} def decode(%{a: a, b: b}, encrypted) do if Integer.gcd(a, @alphabet_size) != 1 do {:error, "a and m must be coprime."} diff --git a/exercises/practice/affine-cipher/lib/affine_cipher.ex b/exercises/practice/affine-cipher/lib/affine_cipher.ex index f04dc5cc1e..1fab119051 100644 --- a/exercises/practice/affine-cipher/lib/affine_cipher.ex +++ b/exercises/practice/affine-cipher/lib/affine_cipher.ex @@ -14,7 +14,7 @@ defmodule AffineCipher do @doc """ Decode an encrypted message using a key """ - @spec decode(key :: key(), message :: String.t()) :: {:ok, String.t()} | {:error, String.t()} + @spec decode(key :: key(), encrypted :: String.t()) :: {:ok, String.t()} | {:error, String.t()} def decode(%{a: a, b: b}, encrypted) do end end