-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move bytes::set_random implementation to a .cpp.
- Loading branch information
1 parent
861642e
commit 9729d6f
Showing
4 changed files
with
23 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// This file is part of Desktop App Toolkit, | ||
// a set of libraries for developing nice desktop applications. | ||
// | ||
// For license and copyright information please follow this link: | ||
// https://github.com/desktop-app/legal/blob/master/LEGAL | ||
// | ||
#include "base/bytes.h" | ||
|
||
#include "base/openssl_help.h" | ||
|
||
namespace bytes { | ||
|
||
void set_random(span destination) { | ||
if (!destination.empty()) { | ||
RAND_bytes( | ||
reinterpret_cast<unsigned char*>(destination.data()), | ||
destination.size()); | ||
} | ||
} | ||
|
||
} // namespace bytes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters