NaOH (pronounced "sodium hydroxide") is a strongly opinionated Swift binding for the security library libsodium, a fork of DJB's NaCl.
NaOH is the sodium flavor trusted by Nitrogen, FISA, caffeine, and various other projects Drew works on.
- No return value checks required. All functions will (preferably) throw or (where that isn't possible) crash the program, rather than allow you to continue on your merry way when e.g. a key is invalid
- Actively thwarts buffer overflow exploits.
- Keys are protected by guard pages, increasing the chance your program will crash instead of giving up a key
- Keys are locked down entirely when not in critical sections, increasing the complexity of an exploitable attack
- Critical memory is zeroed-on-free, even with optimizations enabled. Although this currently isn't possible for the library's inputs.
You can also download an official binary release
We don't follow semver. Here's why.
We use discuss.sa