chromium/base/uuid.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/uuid.h"

#include <stddef.h>
#include <stdint.h>

#include <ostream>
#include <string_view>

#include "base/containers/span.h"
#include "base/hash/hash.h"
#include "base/rand_util.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/types/pass_key.h"

namespace base {

namespace {

template <typename Char>
constexpr bool IsLowerHexDigit(Char c) {}

constexpr bool IsHyphenPosition(size_t i) {}

// Returns a canonical Uuid string given that `input` is validly formatted
// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, such that x is a hexadecimal digit.
// If `strict`, x must be a lower-case hexadecimal digit.
template <typename StringPieceType>
std::string GetCanonicalUuidInternal(StringPieceType input, bool strict) {}

}  // namespace

// static
Uuid Uuid::GenerateRandomV4() {}

// static
Uuid Uuid::FormatRandomDataAsV4(
    base::span<const uint8_t, 16> input,
    base::PassKey<content::FileSystemAccessManagerImpl> /*pass_key*/) {}

// static
Uuid Uuid::FormatRandomDataAsV4ForTesting(base::span<const uint8_t, 16> input) {}

// static
Uuid Uuid::FormatRandomDataAsV4Impl(base::span<const uint8_t, 16> input) {}

// static
Uuid Uuid::ParseCaseInsensitive(std::string_view input) {}

// static
Uuid Uuid::ParseCaseInsensitive(std::u16string_view input) {}

// static
Uuid Uuid::ParseLowercase(std::string_view input) {}

// static
Uuid Uuid::ParseLowercase(std::u16string_view input) {}

Uuid::Uuid() = default;

Uuid::Uuid(const Uuid& other) = default;

Uuid& Uuid::operator=(const Uuid& other) = default;

Uuid::Uuid(Uuid&& other) = default;

Uuid& Uuid::operator=(Uuid&& other) = default;

const std::string& Uuid::AsLowercaseString() const {}

std::ostream& operator<<(std::ostream& out, const Uuid& uuid) {}

size_t UuidHash::operator()(const Uuid& uuid) const {}

}  // namespace base