From 34174963212086a3ed9d4910be4ea7cb717648e7 Mon Sep 17 00:00:00 2001 From: Alfie <6824891+aaaaargZombies@users.noreply.github.com> Date: Fri, 30 Aug 2024 16:00:46 +0100 Subject: [PATCH 1/2] chore: typo --- exercises/practice/affine-cipher/lib/affine_cipher.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 7c4af3286d02795a5e4c7167ff8edc39687f4319 Mon Sep 17 00:00:00 2001 From: Angelika Tyborska Date: Mon, 2 Sep 2024 21:24:58 +0200 Subject: [PATCH 2/2] Also fix typo in example solution --- exercises/practice/affine-cipher/.meta/example.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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."}