diff --git a/README.md b/README.md index 2a11eef..6a71b41 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,13 @@ Now you can use bare `encrypt/1` and `decrypt/1`: |> Cipher.decrypt # "secret" ``` +### Decryption errors + +When you decrypt non-valid strings you can get two kinds of errors: + +* `{:error, "Could not decode string 'yourstring'"}` if your string was tampered or wrongly transferred. +* `{:error, "Could not decrypt string 'yourstring'"}` if your string was encrypted using different keys. Maybe some edge cases of tampering too. + ## Cipher/Parse JSON `cipher/1` and `parse/1`. Just as `encrypt/1` and `decrypt/1` but for JSON.