jedisct1 / libsodium-doc

Gitbook documentation for libsodium
https://libsodium.org
ISC License
166 stars 159 forks source link

Suggestion: Specify values of constants #126

Closed samuel-lucas6 closed 3 years ago

samuel-lucas6 commented 3 years ago

Since the constants for functions are listed in the documentation, I think it would be beneficial if the values of the constants were listed there as well, so the information is centralised in one place. For example:

Constants

  • crypto_aead_xchacha20poly1305_ietf_KEYBYTES = 32
  • crypto_aead_xchacha20poly1305_ietf_NPUBBYTES = 24
  • crypto_aead_xchacha20poly1305_ietf_ABYTES = 16

I appreciate that this would be annoying to update if you had to change anything, but surely these values never get amended for most functions.

jedisct1 commented 3 years ago

Well, the purpose of these macros/functions is to avoid applications using the values directly.

And yes, some of them do change. That happened for parameters related to password hashing functions for example.