Response
public struct Response
An APDU response per ISO/IEC 7816-4. It consists of a conditional body and a two byte trailer. This class does not attempt to semantically verify an APDU response.
See also
ResponseType
-
Initialize APDU response with raw Data.
Declaration
Swift
public init(apdu data: Data) throwsParameters
datathe raw APDU response data
-
Success response [0x9000]
Declaration
Swift
public static let OK: APDU.Response
-
Convenience initializer for APDU repsonses that come in three parts
Throws
APDU.ErrorDeclaration
Swift
public init(body: Data, sw1: UInt8, sw2: UInt8) throwsParameters
bodyresponse body, may be empty
sw1the SW1 command processing byte
sw2the SW2 command processing byte
-
The response body
See also
ResponseType.dataDeclaration
Swift
public var data: Data? { get } -
The response body length
See also
ResponseType.nrDeclaration
Swift
public var nr: Int { get } -
The response status word - upper byte
See also
ResponseType.sw1Declaration
Swift
public var sw1: UInt8 { get } -
The response status word - lower byte
See also
ResponseType.sw2Declaration
Swift
public var sw2: UInt8 { get } -
The response status word
See also
ResponseType.swDeclaration
Swift
public var sw: UInt16 { get }