Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-implement devRandomSalt() to support Windows and purge randomSalt() (
#378) * Re-implement devRandomSalt() to support Windows and purge randomSalt() The old code opens /dev/urandom, that path doesn't exist on Windows obviously so it falls back to randomSalt(), which uses std/random, and that's not cryptographically secure. So this commit removes randomSalt() and modifies devRandomSalt() to use std/sysrand which is a low-level wrapper to the system's underlying CSPRNG. Also, this new proc is a tiny bit faster than the old code (at least on Linux, since it uses a system call instead of opening /dev/urandom) , but that's not the primary purpose of this commit. * Update makeSalt & devRandomSalt to suit review
- Loading branch information