You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: