Skip to content

Commit d2da6d2

Browse files
committed
Improve readme
1 parent 72f39e4 commit d2da6d2

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ Now you can use bare `encrypt/1` and `decrypt/1`:
3535
|> Cipher.decrypt # "secret"
3636
```
3737

38+
### Decryption errors
39+
40+
When you decrypt non-valid strings you can get two kinds of errors:
41+
42+
* `{:error, "Could not decode string 'yourstring'"}` if your string was tampered or wrongly transferred.
43+
* `{:error, "Could not decrypt string 'yourstring'"}` if your string was encrypted using different keys. Maybe some edge cases of tampering too.
44+
3845
## Cipher/Parse JSON
3946

4047
`cipher/1` and `parse/1`. Just as `encrypt/1` and `decrypt/1` but for JSON.

0 commit comments

Comments
 (0)