Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseResponse ¶
ParseResponse parses response and returns response data and/or error if the status word is not 0x9000
Types ¶
type APDU ¶
APDU represents ISO-7816 APDU command
func FromString ¶
FromString creates APDU command from hexadecimal string
func MustFromString ¶
MustFromString creates APDU command from hexadecimal string and panics on error
type Response ¶
type Response struct { Data []byte StatusWord StatusWord }
Response to APDU command from the target
func NewResponse ¶
NewResponse parses byte slice and returns Response struct or error
type StatusWord ¶
type StatusWord [2]byte
StatusWord is a mandatory part of the response to APDU command
func (StatusWord) IsError ¶
func (sw StatusWord) IsError() bool
IsError returns true if the status word is not 0x9fXX or 0x9000
Click to show internal directories.
Click to hide internal directories.