Replies: 2 comments 9 replies
-
It's somewhere in the docs (but I'm not finding it now, so it could/should be somewhere more prominent, I looked at the "Usage" page and searched), but libsodium uses the "inverted return code" convention: 0 means success and negative means error. These functions can't fail though, as they're just a stream cipher. Note that wrong parameters in libsodium are handled using the misuse mechanism - which calls abort() (outside tests). |
Beta Was this translation helpful? Give feedback.
6 replies
-
https://libsodium.gitbook.io/doc/quickstart#how-to-check-if-a-function-call-succeeded |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
According to the documentation for XChaCha20, multiple functions return an
int
. However, the documentation doesn't specify what thisint
means or what values it can take. What's the intent here?Beta Was this translation helpful? Give feedback.
All reactions