Example:
Cipher.decrypt("ddd")
Error
** (MatchError) no match of right hand side value: :error
lib/cipher.ex:36: Cipher.decrypt/1
on line 36 of lib/cipher.ex:
{:ok, decoded} = crypted |> URI.decode_www_form |> Base.decode64
Why does this matter?
Because there may be cases where you are attempting to decrypt something, say an encrypted token coming over an api endpoint, and it may have been injected by a hacker. Should fail gracefully with a sensible reason why.