blob: f32d7e3b759253bd7488e8081b5b8b28b9bd163b [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <stddef.h>
#include <stdint.h>
#include <vector>
#include "base/containers/span.h"
namespace device {
namespace u2f_parsing_utils {
// U2FResponse offsets. The format of a U2F response is defined in
extern const uint32_t kU2fResponseKeyHandleLengthPos;
extern const uint32_t kU2fResponseKeyHandleStartPos;
extern const char kEs256[];
void Append(std::vector<uint8_t>* target, base::span<const uint8_t> in_values);
// Parses out a sub-vector after verifying no out-of-bound reads.
std::vector<uint8_t> Extract(base::span<const uint8_t> source,
size_t pos,
size_t length);
} // namespace u2f_parsing_utils
} // namespace device