io

package
v0.0.0-...-8d18b63 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2019 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NormalChannel

type NormalChannel struct {
	// contains filtered or unexported fields
}

NormalChannel implements a normal channel to send apdu commands and receive apdu responses.

func NewNormalChannel

func NewNormalChannel(t Transmitter) *NormalChannel

NewNormalChannel returns a new NormalChannel that sends commands to Transmitter t.

func (*NormalChannel) Send

func (c *NormalChannel) Send(cmd *apdu.Command) (*apdu.Response, error)

Send sends apdu commands to the current Transmitter. Based on the smartcard transport protocol (T=0, T=1), it checks responses and sends a Get Response command in case of T=0.

type Transmitter

type Transmitter interface {
	Transmit([]byte) ([]byte, error)
}

Transmitter defines an interface with one method to transmit raw commands and receive raw responses.

Jump to

Keyboard shortcuts

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