#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "device/fido/fido_parsing_utils.h"
#include "base/check_op.h"
#include "base/numerics/safe_conversions.h"
#include "base/strings/stringprintf.h"
namespace device {
namespace fido_parsing_utils {
namespace {
constexpr bool AreSpansDisjoint(base::span<const uint8_t> lhs,
base::span<const uint8_t> rhs) { … }
}
const char kEs256[] = …;
std::vector<uint8_t> Materialize(base::span<const uint8_t> span) { … }
std::optional<std::vector<uint8_t>> MaterializeOrNull(
std::optional<base::span<const uint8_t>> span) { … }
void Append(std::vector<uint8_t>* target, base::span<const uint8_t> in_values) { … }
std::vector<uint8_t> Extract(base::span<const uint8_t> span,
size_t pos,
size_t length) { … }
base::span<const uint8_t> ExtractSpan(base::span<const uint8_t> span,
size_t pos,
size_t length) { … }
std::vector<uint8_t> ExtractSuffix(base::span<const uint8_t> span, size_t pos) { … }
base::span<const uint8_t> ExtractSuffixSpan(base::span<const uint8_t> span,
size_t pos) { … }
std::vector<base::span<const uint8_t>> SplitSpan(base::span<const uint8_t> span,
size_t max_chunk_size) { … }
std::array<uint8_t, crypto::kSHA256Length> CreateSHA256Hash(
std::string_view data) { … }
std::string_view ConvertToStringView(base::span<const uint8_t> data) { … }
std::string ConvertBytesToUuid(base::span<const uint8_t, 16> bytes) { … }
}
}