Versions in this module Expand all Collapse all v1 v1.0.0 Jun 13, 2026 Changes in this version + const CtlCodePcToRdrEscape + const CtlCodeSetProtocol + func CRC16CCITTFalse(in []byte) uint16 + func LRC(in []byte) byte + type ATR struct + FiDi byte + GuardTime byte + Historical []byte + Inverse bool + Protocols []byte + StopClock byte + T0WI byte + T1CRC bool + T1IFSC byte + T1Waiting byte + func (a *ATR) UnmarshalBinary(data []byte) error + type PCSC interface + ATR func() ([]byte, error) + DeviceName func() string + Reconnect func(context.Context) error v0 v0.0.4 Jun 10, 2026 Changes in this version + type ATS struct + HasT0 bool + Historical []byte + T0 byte + TA byte + TB byte + TC byte + func (a *ATS) ClearTA() + func (a *ATS) ClearTB() + func (a *ATS) ClearTC() + func (a *ATS) SetT0(t0 byte) + func (a *ATS) SetTA(ta byte) + func (a *ATS) SetTB(tb byte) + func (a *ATS) SetTBParams(fwi, sfgi byte) + func (a *ATS) SetTC(tc byte) + func (a *ATS) UnmarshalBinary(data []byte) error + func (a ATS) FSC() int + func (a ATS) FSCI() int + func (a ATS) FWI() byte + func (a ATS) FWT() time.Duration + func (a ATS) HasTA() bool + func (a ATS) HasTB() bool + func (a ATS) HasTC() bool + func (a ATS) MarshalBinary() ([]byte, error) + func (a ATS) SFGI() byte + func (a ATS) SFGT() time.Duration v0.0.3 Nov 17, 2025 v0.0.2 Sep 22, 2025 Changes in this version + func Escapable[T any](ctx context.Context, fn func(context.Context) (T, error)) (_ T, err error) + type APDUer interface + APDU func(context.Context, apdu.Capdu) (apdu.Rapdu, error) + type APDUerFunc func(context.Context, apdu.Capdu) (apdu.Rapdu, error) + func (f APDUerFunc) APDU(ctx context.Context, capdu apdu.Capdu) (apdu.Rapdu, error) + func (f APDUerFunc) Exchange(ctx context.Context, capdu []byte) (_ []byte, err error) + type Exchanger interface + Exchange func(ctx context.Context, capdu []byte) ([]byte, error) + type ExchangerAPDUer interface + func RawSmartCardAPDUer(sc RawSmartCard) ExchangerAPDUer + func RawSmartCardControlAPDUer(sc RawSmartCardControl, ioctl uint32) ExchangerAPDUer + func SmartCardControlAPDUer(sc SmartCardControl, code uint16) ExchangerAPDUer + type ExchangerFunc func(ctx context.Context, capdu []byte) ([]byte, error) + func (f ExchangerFunc) APDU(ctx context.Context, capdu apdu.Capdu) (_ apdu.Rapdu, err error) + func (f ExchangerFunc) Exchange(ctx context.Context, capdu []byte) ([]byte, error) + type RawSmartCard interface + Transmit func(data []byte) ([]byte, error) + type RawSmartCardControl interface + Control func(ioctl uint32, data []byte) ([]byte, error) + type SmartCardControl interface + Control func(ctx context.Context, code uint16, data []byte) ([]byte, error) + func RawSmartCardControlToSmartCardControl(sc RawSmartCardControl, controlCodeToIoctl func(code uint16) uint32) SmartCardControl + type SmartCardControlFunc func(ctx context.Context, code uint16, data []byte) ([]byte, error) + func (f SmartCardControlFunc) Control(ctx context.Context, code uint16, data []byte) ([]byte, error) v0.0.1 Sep 21, 2025 Changes in this version + var DeferWrap = func(ctx context.Context, err *error) + var ErrorAttrs = func(err error) slog.Attr + func LogHex(key string, value []byte) slog.Attr + func Must[T any](val T, err error) T