jedisct1 / libsodium.js

libsodium compiled to Webassembly and pure JavaScript, with convenient wrappers.
Other
968 stars 138 forks source link

Duplicate ​"​​crypto_aead_*" constants #307

Closed Jack-Edwards closed 1 year ago

Jack-Edwards commented 1 year ago

Printing the sodium module in the browser reveals some duplicate constant values. Their only differentiation is whether "IETF" is uppercase or lowercase.

Which set is "more correct"? I don't want to map both sets, nor do I want to map the one set that may be removed in the future.

Uppercase IETF:

Lowercase IETF:

jedisct1 commented 1 year ago

Use the lowercase ones (crypto_aead_chacha20poly1305_ietf_ABYTES).

The other ones are for backward compatibility with a very old version of libsodium.