// 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. #ifndef COMPONENTS_APDU_APDU_COMMAND_H_ #define COMPONENTS_APDU_APDU_COMMAND_H_ #include <cinttypes> #include <optional> #include <utility> #include <vector> #include "base/component_export.h" #include "base/containers/span.h" #include "base/gtest_prod_util.h" namespace apdu { // APDU commands are defined as part of ISO 7816-4. Commands can be serialized // into either short length encodings, where the maximum data length is 256 // bytes, or an extended length encoding, where the maximum data length is 65536 // bytes. This class implements only the extended length encoding. Serialized // commands consist of a CLA byte, denoting the class of instruction, an INS // byte, denoting the instruction code, P1 and P2, each one byte denoting // instruction parameters, a length field (Lc), a data field of length Lc, and // a maximum expected response length (Le). class COMPONENT_EXPORT(APDU) ApduCommand { … }; } // namespace apdu #endif // COMPONENTS_APDU_APDU_COMMAND_H_