protocol

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package protocol defines the Token2 commands shared by transport adapters.

Index

Constants

View Source
const (

	// SerialResponseTag identifies the serial-number TLV returned by the device.
	SerialResponseTag = 0xd1
)

Variables

This section is empty.

Functions

func ConfigurationCommand

func ConfigurationCommand() iso7816.Command

ConfigurationCommand reads the Token2 device configuration.

func LegacySerialNumberPreludeCommand

func LegacySerialNumberPreludeCommand() iso7816.Command

LegacySerialNumberPreludeCommand primes the device-information command on firmware releases such as R3.1 which initially reject it with 6D00.

func ReaderNFCCommand

func ReaderNFCCommand(enabled bool) iso7816.Command

ReaderNFCCommand enables or disables the Token2 reader NFC interface.

func ReaderSoundCommand

func ReaderSoundCommand(level byte) iso7816.Command

ReaderSoundCommand configures the Token2 reader sound level.

func SelectFIDOCommand

func SelectFIDOCommand() iso7816.Command

SelectFIDOCommand selects the standard FIDO application used by the Token2 serial-number command over PC/SC.

func SelectOTPCommand

func SelectOTPCommand() iso7816.Command

SelectOTPCommand selects the Token2 OTP application used by configuration and initial serial-number commands.

func SerialNumberCommand

func SerialNumberCommand(encoding iso7816.Encoding) iso7816.Command

SerialNumberCommand reads the full device serial number. HID uses extended APDU encoding while PC/SC uses short encoding.

Types

This section is empty.

Jump to

Keyboard shortcuts

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