src/crypto/random_unittest.cc
bool IsTrivial(const std::string& bytes) {
  for (size_t i = 0; i < bytes.size(); i++) {
    if (bytes[i] != bytes[0]) {
      return false;
    }
  }
  return true;
}
// Ensures we don't have all trivial data, i.e. that the data is indeed random.
// Currently, that means the bytes cannot be all the same (e.g. all zeros).
Ensures we don't have all trivial data, i.e. that the data is indeed random.
Currently, that means the bytes cannot be all the same .
Ensures we don ' t have all trivial data i . e . that the data is indeed random . Currently that means the bytes cannot be all the same .
bool IsTrivial(const std::string& bytes) {
  for (size_t i = 0; i < bytes.size(); i++) {
    if (bytes[i] != bytes[0]) {
      return false;
    }
  }
  return true;
}
bool IsTrivial ( const std :: string & bytes ) { for ( size_t i = 0 ; i < bytes . size ( ) ; i ++ ) { if ( bytes [ i ] != bytes [ 0 ] ) { return false ; } } return true ; }
Ensures we don't have all trivial data, i.e.
Ensures we don ' t have all trivial data i . e .