protocol

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 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 ConfigCommand

func ConfigCommand() apdu.Command

ConfigCommand reads the Token2 device configuration.

func LegacySerialNumberPreludeCommand

func LegacySerialNumberPreludeCommand() apdu.Command

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

func SelectOTPCommand

func SelectOTPCommand() apdu.Command

SelectOTPCommand selects the Token2 OTP application used by configuration and device-information commands.

func SerialNumberCommand

func SerialNumberCommand(extended bool) apdu.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