mirror of
https://github.com/shaka-project/shaka-packager.git
synced 2026-04-03 03:40:05 +00:00
Some checks failed
Update Issues / update-issues (push) Has been cancelled
Release / Settings (push) Has been cancelled
Release / release (push) Has been cancelled
Release / Compute latest release flag (push) Has been cancelled
Release / Update docs (push) Has been cancelled
Release / Build (push) Has been cancelled
Release / Update docker image (push) Has been cancelled
Release / Artifacts (push) Has been cancelled
Release / Update NPM (push) Has been cancelled
All deprecations have been addressed in this PR and Protobuf has been updated to 33.5 as older versions lead to build failures on Linux with this abseil-cpp version.
26 lines
798 B
C++
26 lines
798 B
C++
// Copyright 2022 Google LLC. All rights reserved.
|
|
//
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file or at
|
|
// https://developers.google.com/open-source/licenses/bsd
|
|
|
|
#ifndef PACKAGER_UTILS_HEX_PARSER_H_
|
|
#define PACKAGER_UTILS_HEX_PARSER_H_
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace shaka {
|
|
|
|
// If you use absl::HexStringToBytes directly, any invalid byte sequence will
|
|
// be converted into NUL characters silently. This function will validate the
|
|
// input.
|
|
bool ValidHexStringToBytes(const std::string& hex, std::string* bytes);
|
|
|
|
// same but output to a vector of uint8_t
|
|
bool ValidHexStringToBytes(const std::string& hex, std::vector<uint8_t>* bytes);
|
|
|
|
} // namespace shaka
|
|
#endif // PACKAGER_UTILS_HEX_PARSER_H_
|