blob: 5f02678ff98009788a65e6c0a049847bcd5439a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/base/hex_utils.h"
#include "base/check.h"
#include "base/strings/string_number_conversions.h"
#include "net/third_party/quiche/src/quiche/common/quiche_text_utils.h"
namespace net {
std::string HexDecode(std::string_view hex) {
std::string output;
const bool success = base::HexStringToString(hex, &output);
DCHECK(success);
return output;
}
std::string HexDump(std::string_view input) {
return quiche::QuicheTextUtils::HexDump(input);
}
} // namespace net
|