11#ifndef __BE_DEVICE_SMARTCARD_H__
12#define __BE_DEVICE_SMARTCARD_H__
121 unsigned int cardNum);
148 unsigned int cardNum,
266 std::unique_ptr<Smartcard::Impl> pimpl;
Representation of a single ISO 7816 smartcard in the system.
void setDryrun(bool state)
Set the 'dryrun' state.
Smartcard & operator=(Smartcard &&other) noexcept
Move assignment.
Smartcard(unsigned int cardNum)
Connect to the Nth card in the system independent of any application installed on the card.
Smartcard(Smartcard &&other) noexcept
Move constructor.
Memory::uint8Array getLastAPDU() const
Obtain a copy of the last APDU sent to the card.
Smartcard(unsigned int cardNum, const Memory::uint8Array &appID)
Connect to the Nth card in the system and activate the application with the given identifier.
APDUResponse sendAPDU(Device::Smartcard::APDU &apdu)
Send an APDU to a card using the best transmission method available for the card.
Memory::uint8Array getDedicatedFileObject(const Memory::uint8Array &objectID)
Read a data object from the application dedicated file.
std::string getReaderID() const
Obtain the identifier of the reader that the smartcard is plugged into.
Memory::uint8Array getLastResponseData() const
Obtain a copy of the last response data returned from the card.
This software was developed at the National Institute of Standards and Technology (NIST) by employees...
Exception thrown when a command fails.
APDUResponse response
The partial response data and status words from the failed command.
APDUException()=default
Constructor.
APDUException(const APDUResponse &response, const Memory::uint8Array &apdu)
Constructor.
Memory::uint8Array apdu
The raw APDU that was sent.
The data and status words returned by the card in response to a command.
uint8_t sw1
status word one
APDUResponse()=default
Constructor.
uint8_t sw2
status word two
APDUResponse(const Memory::uint8Array &data, const uint8_t sw1, const uint8_t sw2)
Constructor.
Memory::uint8Array data
The response data, possibly incomplete.