Documentation ¶
Overview ¶
Package u2fhid implements the low-level FIDO U2F HID protocol.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Devices ¶
func Devices() ([]*hid.DeviceInfo, error)
Devices lists available HID devices that advertise the U2F HID protocol.
Types ¶
type Device ¶
type Device struct { ProtocolVersion uint8 MajorDeviceVersion uint8 MinorDeviceVersion uint8 BuildDeviceVersion uint8 // RawCapabilities is the raw capabilities byte provided by the device // during initialization. RawCapabilities uint8 // CapabilityWink is true if the device advertised support for the wink // command during initilization. Even if this flag is true, the device may // not actually do anything if the command is called. CapabilityWink bool // contains filtered or unexported fields }
A Device is used to communicate with a U2F HID device.
func Open ¶
func Open(info *hid.DeviceInfo) (*Device, error)
Open initializes a communication channel with a U2F HID device.
func (*Device) Close ¶
func (d *Device) Close()
Close closes the device and frees associated resources.
func (*Device) Command ¶
Command sends a command and associated data to the device and returns the response.
func (*Device) Message ¶
Message sends an encapsulated U2F protocol message to the device and returns the response.
Click to show internal directories.
Click to hide internal directories.