Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 394bdcc1 authored by David Duarte's avatar David Duarte
Browse files

RootCanal: Replace usage of base/rand_util by std random



Tag: #testing
Test: m root-canal
Change-Id: I262fc16e3578f9608a73269dafb82411312efeb9
Signed-off-by: default avatarDavid Duarte <licorne@google.com>
parent 19917763
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -18,9 +18,9 @@

#include "uuid.h"

#include <base/rand_util.h>
#include <base/strings/stringprintf.h>
#include <algorithm>
#include <random>

namespace bluetooth {

@@ -146,7 +146,8 @@ const UUID128Bit& Uuid::To128BitBE() const {

Uuid Uuid::GetRandom() {
  Uuid uuid;
  base::RandBytes(uuid.uu.data(), uuid.uu.size());
  std::independent_bits_engine<std::default_random_engine, 8, uint8_t> engine;
  std::generate(std::begin(uuid.uu), std::end(uuid.uu), std::ref(engine));
  return uuid;
}