bytes.cpp 461 B

12345678910111213141516171819
  1. // This file is part of Desktop App Toolkit,
  2. // a set of libraries for developing nice desktop applications.
  3. //
  4. // For license and copyright information please follow this link:
  5. // https://github.com/desktop-app/legal/blob/master/LEGAL
  6. //
  7. #include "base/bytes.h"
  8. #include "base/random.h"
  9. namespace bytes {
  10. void set_random(span destination) {
  11. if (!destination.empty()) {
  12. base::RandomFill(destination.data(), destination.size());
  13. }
  14. }
  15. } // namespace bytes