Documentation ¶
Index ¶
Constants ¶
View Source
const ( TagSelectResponsePreInitialized uint8 = 0x80 TagApplicationStatusTemplate uint8 = 0xA3 TagApplicationInfoTemplate uint8 = 0xA4 TagApplicationInfoCapabilities uint8 = 0x8D )
Variables ¶
View Source
var ErrApplicationStatusTemplateNotFound = errors.New("application status template not found")
View Source
var ErrWrongApplicationInfoTemplate = errors.New("wrong application info template")
View Source
var (
TagSignatureTemplate = uint8(0xA0)
)
Functions ¶
This section is empty.
Types ¶
type ApplicationInfo ¶
type ApplicationInfo struct { Installed bool Initialized bool SeedExportable []byte InstanceUID []byte SecureChannelPublicKey []byte Version []byte AvailableSlots []byte // KeyUID is the sha256 of of the master public key on the card. // It's empty if the card doesn't contain any key. KeyUID []byte Capabilities Capability }
func ParseApplicationInfo ¶
func ParseApplicationInfo(data []byte) (*ApplicationInfo, error)
func (*ApplicationInfo) HasCapability ¶
func (a *ApplicationInfo) HasCapability(c Capability) bool
func (*ApplicationInfo) HasCredentialsManagementCapability ¶
func (a *ApplicationInfo) HasCredentialsManagementCapability() bool
func (*ApplicationInfo) HasKeyManagementCapability ¶
func (a *ApplicationInfo) HasKeyManagementCapability() bool
func (*ApplicationInfo) HasNDEFCapability ¶
func (a *ApplicationInfo) HasNDEFCapability() bool
func (*ApplicationInfo) HasSecureChannelCapability ¶
func (a *ApplicationInfo) HasSecureChannelCapability() bool
type ApplicationStatus ¶
type ApplicationStatus struct { PinRetryCount int PUKRetryCount int KeyInitialized bool Path string }
func ParseApplicationStatus ¶
func ParseApplicationStatus(data []byte) (*ApplicationStatus, error)
type Capability ¶
type Capability uint8
const ( CapabilitySecureChannel Capability = 1 << iota CapabilityKeyManagement CapabilityCredentialsManagement CapabilityNDEF CapabilityAll = CapabilitySecureChannel | CapabilityKeyManagement | CapabilityCredentialsManagement | CapabilityNDEF )
type Channel ¶
Channel is an interface with a Send method to send apdu commands and receive apdu responses.
type PairingInfo ¶
type Signature ¶
type Signature struct {
// contains filtered or unexported fields
}
func ParseSignature ¶
Click to show internal directories.
Click to hide internal directories.