apdu

package
v0.0.0-...-ac3d764 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMalformedResponse = errors.New("malformed APDU response")

Functions

func IsStatus

func IsStatus(err error, sw uint16) bool

Types

type Request

type Request struct {
	CLA  byte
	INS  byte
	P1   byte
	P2   byte
	Data []byte
	Le   *byte
}

func (Request) APDU

func (r Request) APDU() []byte

func (Request) Bytes

func (r Request) Bytes() []byte

func (Request) MarshalBinary

func (r Request) MarshalBinary() ([]byte, error)

func (Request) String

func (r Request) String() string

func (*Request) UnmarshalBinary

func (r *Request) UnmarshalBinary(data []byte) error

func (Request) WriteTo

func (r Request) WriteTo(w io.Writer) (n int64, err error)

type Response

type Response []byte

func (Response) Data

func (r Response) Data() []byte

func (Response) HasMore

func (r Response) HasMore() bool

func (Response) MarshalBinary

func (r Response) MarshalBinary() ([]byte, error)

func (Response) OK

func (r Response) OK() bool

func (Response) SW

func (r Response) SW() uint16

func (Response) SW1

func (r Response) SW1() byte

func (Response) SW2

func (r Response) SW2() byte

func (Response) String

func (r Response) String() string

func (*Response) UnmarshalBinary

func (r *Response) UnmarshalBinary(data []byte) error

func (Response) WriteTo

func (r Response) WriteTo(w io.Writer) (int64, error)

type StatusError

type StatusError struct {
	SW uint16
}

func (StatusError) Error

func (e StatusError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL