Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2021-05-12 | Make OpenSSLGenerator max() and min() constexpr | Ed Tanous | 1 | -2/+2 | |
The latest version of gcc seems to be enforcing that these are static and constexpr, presumably because std::random_device is now using them in a constexpr context. It seems odd this would be required (you'd think it would be breaking backward compatibility) but it's an easy enough change to make. Tested: Only tested that code builds. Not tested functionally. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I3f5e7077d56178fbc7b4e02f4e2f4a357c928c5b | |||||
2020-10-09 | Move Openssl Generator | Ed Tanous | 1 | -0/+46 | |
This commit moves the openssl random number generator into its own file, so it can be used in EventService, and moves it to its own file. Seeding a random number generator with time is bad practice in general, so much so that there's a CERT rule about it as well as a clang-tidy check. https://clang.llvm.org/extra/clang-tidy/checks/cert-msc51-cpp.html This doesn't matter much in this case, as we're generating a randomized int for an ID, but it will matter in other cases, and we'd like to have the check on to verify that. Change-Id: I8e6aebb7962d259045ffd558eea22f07f9c23821 Signed-off-by: Ed Tanous <ed@tanous.net> |