Skip to content

Commit

Permalink
affine-cypher: typo (#1520)
Browse files Browse the repository at this point in the history
* chore: typo

* Also fix typo in example solution

---------

Co-authored-by: Angelika Tyborska <angelikatyborska@fastmail.com>
  • Loading branch information
aaaaargZombies and angelikatyborska authored Sep 2, 2024
1 parent 3ea44a6 commit 26bf316
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion exercises/practice/affine-cipher/.meta/example.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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."}
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/affine-cipher/lib/affine_cipher.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 26bf316

Please sign in to comment.