cryptotokenkit

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package cryptotokenkit provides a fluent Go API over the macOS CryptoTokenKit framework.

Construction

New… functions create objects; each With… method sets one property and returns its receiver, so configuration calls chain. A <Type>FromID constructor adopts an Objective-C object obtained elsewhere.

Lifecycle

A wrapper releases its Objective-C object automatically once the garbage collector finds it unreachable. Call Release to relinquish the reference deterministically (for objects holding scarce resources); Release is idempotent, and afterwards the wrapper's methods are no-ops returning zero values.

Errors

Failing calls return errors carrying the Objective-C error domain and code. Match them against this package's Err… sentinel values with errors.Is, or inspect domain, code, and Apple's prose via errors.As with *errkit.Error.

Delegates

A …Delegate interface is implemented by a plain Go value and installed with the matching With… setter; the package builds the Objective-C delegate object behind the scenes. Optional protocol methods are separate one-method …Handler interfaces — implement the ones you need on the same value and the framework calls them too.

Types

Each base type below lists the concrete types you construct and pass where the base is accepted:

Index

Constants

This section is empty.

Variables

View Source
var ErrCodeAuthenticationFailed = errkit.New("TKErrorDomain", -5)

ErrCodeAuthenticationFailed matches the CryptoTokenKit error TKErrorCodeAuthenticationFailed.

View Source
var ErrCodeAuthenticationNeeded = errkit.New("TKErrorDomain", -9)

ErrCodeAuthenticationNeeded matches the CryptoTokenKit error TKErrorCodeAuthenticationNeeded.

View Source
var ErrCodeBadParameter = errkit.New("TKErrorDomain", -8)

ErrCodeBadParameter matches the CryptoTokenKit error TKErrorCodeBadParameter.

View Source
var ErrCodeCanceledByUser = errkit.New("TKErrorDomain", -4)

ErrCodeCanceledByUser matches the CryptoTokenKit error TKErrorCodeCanceledByUser.

View Source
var ErrCodeCommunicationError = errkit.New("TKErrorDomain", -2)

ErrCodeCommunicationError matches the CryptoTokenKit error TKErrorCodeCommunicationError.

View Source
var ErrCodeCorruptedData = errkit.New("TKErrorDomain", -3)

ErrCodeCorruptedData matches the CryptoTokenKit error TKErrorCodeCorruptedData.

View Source
var ErrCodeNotImplemented = errkit.New("TKErrorDomain", -1)

ErrCodeNotImplemented matches the CryptoTokenKit error TKErrorCodeNotImplemented.

View Source
var ErrCodeObjectNotFound = errkit.New("TKErrorDomain", -6)

ErrCodeObjectNotFound matches the CryptoTokenKit error TKErrorCodeObjectNotFound.

View Source
var ErrCodeTokenNotFound = errkit.New("TKErrorDomain", -7)

ErrCodeTokenNotFound matches the CryptoTokenKit error TKErrorCodeTokenNotFound.

Functions

func DataForTag added in v0.17.0

func DataForTag(tag uint64) []byte

DataForTag encodes a specified tag using BER-TLV tag encoding rules.

func DriverConfigurations added in v0.17.0

func DriverConfigurations() obj.Object

DriverConfigurations contains dictionary of token class configurations keyed by TKTokenDriverClassID of token driver. Hosting application of token extension will contain the list of configurations for hosted token extensions. All other callers will get an empty array. This means that only token's hosting application can actually modify token's configuration. Typically, hosting application will contain only one token extension, therefore this dictionary will have one element.

func TKErrorDomain

func TKErrorDomain() obj.Object

TKErrorDomain returns the string constant TKErrorDomain, for use as a dictionary key or argument.

Types

type BERTLVRecord added in v0.17.0

type BERTLVRecord struct {
	TLVRecord
}

BERTLVRecord is an idiomatic wrapper over the Objective-C class TKBERTLVRecord.

It embeds TLVRecord, promoting that type's methods.

An object that parses BER-encoded data and produces DER-encoded data for TLV records.

func BERTLVRecordFromID added in v0.17.0

func BERTLVRecordFromID(id objc.ID) *BERTLVRecord

BERTLVRecordFromID adopts an existing Objective-C object as a BERTLVRecord (nil for 0), retaining it and registering a release finalizer.

func NewBERTLVRecordWithTagRecords added in v0.17.0

func NewBERTLVRecordWithTagRecords(tag uint64, records []*TLVRecord) *BERTLVRecord

NewBERTLVRecordWithTagRecords initializes a BER-TLV record with the specified tag and an array of TLV subrecords.

func NewBERTLVRecordWithTagValue added in v0.17.0

func NewBERTLVRecordWithTagValue(tag uint64, value []byte) *BERTLVRecord

NewBERTLVRecordWithTagValue initializes a BER-TLV record with the specified tag and value.

type Clockid added in v0.17.0

type Clockid int32
const (
	ClockidRealtime           Clockid = 0
	ClockidMonotonic          Clockid = 6
	ClockidMonotonicRaw       Clockid = 4
	ClockidMonotonicRawApprox Clockid = 5
	ClockidUptimeRaw          Clockid = 8
	ClockidUptimeRawApprox    Clockid = 9
	ClockidProcessCputimeID   Clockid = 12
	ClockidThreadCputimeID    Clockid = 16
)

func (Clockid) String added in v0.17.0

func (e Clockid) String() string

String returns the Clockid constant's name, or its numeric form when the value is not a known constant.

type CompactTLVRecord added in v0.17.0

type CompactTLVRecord struct {
	TLVRecord
}

CompactTLVRecord is an idiomatic wrapper over the Objective-C class TKCompactTLVRecord.

It embeds TLVRecord, promoting that type's methods.

An object that implements encoding using Compact-TLV encoding according to ISO 7816-4.

func CompactTLVRecordFromID added in v0.17.0

func CompactTLVRecordFromID(id objc.ID) *CompactTLVRecord

CompactTLVRecordFromID adopts an existing Objective-C object as a CompactTLVRecord (nil for 0), retaining it and registering a release finalizer.

func NewCompactTLVRecordWithTagValue added in v0.17.0

func NewCompactTLVRecordWithTagValue(tag uint8, value []byte) *CompactTLVRecord

NewCompactTLVRecordWithTagValue initializes a TLV record with the specified tag and value.

type DispatchAutoreleaseFrequency added in v0.17.0

type DispatchAutoreleaseFrequency uint64
const (
	DispatchAutoreleaseFrequencyInherit  DispatchAutoreleaseFrequency = 0
	DispatchAutoreleaseFrequencyWorkItem DispatchAutoreleaseFrequency = 1
	DispatchAutoreleaseFrequencyNever    DispatchAutoreleaseFrequency = 2
)

func (DispatchAutoreleaseFrequency) String added in v0.17.0

String returns the DispatchAutoreleaseFrequency constant's name, or its numeric form when the value is not a known constant.

type DispatchBlockFlags added in v0.17.0

type DispatchBlockFlags uint64

Bitmask — values may be combined with |.

const (
	DispatchBlockFlagsBarrier         DispatchBlockFlags = 1
	DispatchBlockFlagsDetached        DispatchBlockFlags = 2
	DispatchBlockFlagsAssignCurrent   DispatchBlockFlags = 4
	DispatchBlockFlagsNoQosClass      DispatchBlockFlags = 8
	DispatchBlockFlagsInheritQosClass DispatchBlockFlags = 16
	DispatchBlockFlagsEnforceQosClass DispatchBlockFlags = 32
)

func (DispatchBlockFlags) String added in v0.17.0

func (e DispatchBlockFlags) String() string

String returns the DispatchBlockFlags constant's name, or its numeric form when the value is not a known constant.

type EntryID added in v0.17.0

type EntryID int32
const (
	EntryIDFirstEntry EntryID = 0
	EntryIDNextEntry  EntryID = -1
	EntryIDLastEntry  EntryID = -2
)

func (EntryID) String added in v0.17.0

func (e EntryID) String() string

String returns the EntryID constant's name, or its numeric form when the value is not a known constant.

type ErrorCode added in v0.17.0

type ErrorCode int64

Error codes from CryptoTokenKit.

const (
	ErrorCodeNotImplemented       ErrorCode = -1
	ErrorCodeCommunicationError   ErrorCode = -2
	ErrorCodeCorruptedData        ErrorCode = -3
	ErrorCodeCanceledByUser       ErrorCode = -4
	ErrorCodeAuthenticationFailed ErrorCode = -5
	ErrorCodeObjectNotFound       ErrorCode = -6
	ErrorCodeTokenNotFound        ErrorCode = -7
	ErrorCodeBadParameter         ErrorCode = -8
	ErrorCodeAuthenticationNeeded ErrorCode = -9
	// Deprecated: since macOS 10.11.
	ErrorAuthenticationFailed ErrorCode = -5
	// Deprecated: since macOS 10.11.
	ErrorObjectNotFound ErrorCode = -6
	// Deprecated: since macOS 10.11.
	ErrorTokenNotFound ErrorCode = -7
)

func (ErrorCode) String added in v0.17.0

func (e ErrorCode) String() string

String returns the ErrorCode constant's name, or its numeric form when the value is not a known constant.

type FilesecProperty added in v0.17.0

type FilesecProperty int32
const (
	FilesecPropertyOwner        FilesecProperty = 1
	FilesecPropertyGroup        FilesecProperty = 2
	FilesecPropertyUUID         FilesecProperty = 3
	FilesecPropertyMode         FilesecProperty = 4
	FilesecPropertyACL          FilesecProperty = 5
	FilesecPropertyGrpuuid      FilesecProperty = 6
	FilesecPropertyACLRaw       FilesecProperty = 100
	FilesecPropertyACLAllocsize FilesecProperty = 101
)

func (FilesecProperty) String added in v0.17.0

func (e FilesecProperty) String() string

String returns the FilesecProperty constant's name, or its numeric form when the value is not a known constant.

type Flag added in v0.17.0

type Flag int32
const (
	FlagFlagDeferInherit      Flag = 1
	FlagFlagNoInherit         Flag = 131072
	FlagEntryInherited        Flag = 16
	FlagEntryFileInherit      Flag = 32
	FlagEntryDirectoryInherit Flag = 64
	FlagEntryLimitInherit     Flag = 128
	FlagEntryOnlyInherit      Flag = 256
)

func (Flag) String added in v0.17.0

func (e Flag) String() string

String returns the Flag constant's name, or its numeric form when the value is not a known constant.

type Idtype added in v0.17.0

type Idtype int32
const (
	IdtypeAll  Idtype = 0
	IdtypePid  Idtype = 1
	IdtypePgid Idtype = 2
)

func (Idtype) String added in v0.17.0

func (e Idtype) String() string

String returns the Idtype constant's name, or its numeric form when the value is not a known constant.

type IpcInfoObjectType added in v0.17.0

type IpcInfoObjectType uint32
const (
	IpcInfoObjectTypeNone               IpcInfoObjectType = 0
	IpcInfoObjectTypeThreadControl      IpcInfoObjectType = 1
	IpcInfoObjectTypeTaskControl        IpcInfoObjectType = 2
	IpcInfoObjectTypeHost               IpcInfoObjectType = 3
	IpcInfoObjectTypeHostPriv           IpcInfoObjectType = 4
	IpcInfoObjectTypeProcessor          IpcInfoObjectType = 5
	IpcInfoObjectTypeProcessorSet       IpcInfoObjectType = 6
	IpcInfoObjectTypeProcessorSetName   IpcInfoObjectType = 7
	IpcInfoObjectTypeTimer              IpcInfoObjectType = 8
	IpcInfoObjectTypePortSubstOnce      IpcInfoObjectType = 9
	IpcInfoObjectTypeMig                IpcInfoObjectType = 10
	IpcInfoObjectTypeMemoryObject       IpcInfoObjectType = 11
	IpcInfoObjectTypeXmmPager           IpcInfoObjectType = 12
	IpcInfoObjectTypeXmmKernel          IpcInfoObjectType = 13
	IpcInfoObjectTypeXmmReply           IpcInfoObjectType = 14
	IpcInfoObjectTypeUndReply           IpcInfoObjectType = 15
	IpcInfoObjectTypeHostNotify         IpcInfoObjectType = 16
	IpcInfoObjectTypeHostSecurity       IpcInfoObjectType = 17
	IpcInfoObjectTypeLedger             IpcInfoObjectType = 18
	IpcInfoObjectTypeMainDevice         IpcInfoObjectType = 19
	IpcInfoObjectTypeTaskName           IpcInfoObjectType = 20
	IpcInfoObjectTypeSubsystem          IpcInfoObjectType = 21
	IpcInfoObjectTypeIODoneQueue        IpcInfoObjectType = 22
	IpcInfoObjectTypeSemaphore          IpcInfoObjectType = 23
	IpcInfoObjectTypeLockSet            IpcInfoObjectType = 24
	IpcInfoObjectTypeClock              IpcInfoObjectType = 25
	IpcInfoObjectTypeClockCtrl          IpcInfoObjectType = 26
	IpcInfoObjectTypeIokitIdent         IpcInfoObjectType = 27
	IpcInfoObjectTypeNamedEntry         IpcInfoObjectType = 28
	IpcInfoObjectTypeIokitConnect       IpcInfoObjectType = 29
	IpcInfoObjectTypeIokitObject        IpcInfoObjectType = 30
	IpcInfoObjectTypeUpl                IpcInfoObjectType = 31
	IpcInfoObjectTypeMemObjControl      IpcInfoObjectType = 32
	IpcInfoObjectTypeAuSessionport      IpcInfoObjectType = 33
	IpcInfoObjectTypeFileport           IpcInfoObjectType = 34
	IpcInfoObjectTypeLabelh             IpcInfoObjectType = 35
	IpcInfoObjectTypeTaskResume         IpcInfoObjectType = 36
	IpcInfoObjectTypeVoucher            IpcInfoObjectType = 37
	IpcInfoObjectTypeVoucherAttrControl IpcInfoObjectType = 38
	IpcInfoObjectTypeWorkInterval       IpcInfoObjectType = 39
	IpcInfoObjectTypeUxHandler          IpcInfoObjectType = 40
	IpcInfoObjectTypeUextObject         IpcInfoObjectType = 41
	IpcInfoObjectTypeArcadeReg          IpcInfoObjectType = 42
	IpcInfoObjectTypeEventlink          IpcInfoObjectType = 43
	IpcInfoObjectTypeTaskInspect        IpcInfoObjectType = 44
	IpcInfoObjectTypeTaskRead           IpcInfoObjectType = 45
	IpcInfoObjectTypeThreadInspect      IpcInfoObjectType = 46
	IpcInfoObjectTypeThreadRead         IpcInfoObjectType = 47
	IpcInfoObjectTypeSuidCred           IpcInfoObjectType = 48
	IpcInfoObjectTypeHypervisor         IpcInfoObjectType = 49
	IpcInfoObjectTypeTaskIDToken        IpcInfoObjectType = 50
	IpcInfoObjectTypeTaskFatal          IpcInfoObjectType = 51
	IpcInfoObjectTypeKcdata             IpcInfoObjectType = 52
	IpcInfoObjectTypeExclavesResource   IpcInfoObjectType = 53
	IpcInfoObjectTypeThreadResume       IpcInfoObjectType = 54
	IpcInfoObjectTypeUnknown            IpcInfoObjectType = 4294967295
)

func (IpcInfoObjectType) String added in v0.17.0

func (e IpcInfoObjectType) String() string

String returns the IpcInfoObjectType constant's name, or its numeric form when the value is not a known constant.

type LaunchDataType added in v0.17.0

type LaunchDataType int32
const (
	LaunchDataTypeDictionary LaunchDataType = 1
	LaunchDataTypeArray      LaunchDataType = 2
	LaunchDataTypeFd         LaunchDataType = 3
	LaunchDataTypeInteger    LaunchDataType = 4
	LaunchDataTypeReal       LaunchDataType = 5
	LaunchDataTypeBool       LaunchDataType = 6
	LaunchDataTypeString     LaunchDataType = 7
	LaunchDataTypeOpaque     LaunchDataType = 8
	LaunchDataTypeErrno      LaunchDataType = 9
	LaunchDataTypeMachport   LaunchDataType = 10
)

func (LaunchDataType) String added in v0.17.0

func (e LaunchDataType) String() string

String returns the LaunchDataType constant's name, or its numeric form when the value is not a known constant.

type MDLabelDomain

type MDLabelDomain int32

These constants are used to specify a domain to MDLabelCreate().

const (
	KMDLabelUserDomain  MDLabelDomain = 0
	KMDLabelLocalDomain MDLabelDomain = 1
)

func (MDLabelDomain) String

func (e MDLabelDomain) String() string

String returns the MDLabelDomain constant's name, or its numeric form when the value is not a known constant.

type MDQueryOptionFlags

type MDQueryOptionFlags int32
const (
	KMDQuerySynchronous        MDQueryOptionFlags = 1
	KMDQueryWantsUpdates       MDQueryOptionFlags = 4
	KMDQueryAllowFSTranslation MDQueryOptionFlags = 8
)

func (MDQueryOptionFlags) String

func (e MDQueryOptionFlags) String() string

String returns the MDQueryOptionFlags constant's name, or its numeric form when the value is not a known constant.

type MDQuerySortOptionFlags

type MDQuerySortOptionFlags int32
const (
	KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)

func (MDQuerySortOptionFlags) String

func (e MDQuerySortOptionFlags) String() string

String returns the MDQuerySortOptionFlags constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeFlags added in v0.17.0

type MachVMRangeFlags uint64

Bitmask — values may be combined with |.

const (
	MachVMRangeFlagsNone MachVMRangeFlags = 0
)

func (MachVMRangeFlags) String added in v0.17.0

func (e MachVMRangeFlags) String() string

String returns the MachVMRangeFlags constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeFlavor added in v0.17.0

type MachVMRangeFlavor uint32
const (
	MachVMRangeFlavorInvalid MachVMRangeFlavor = 0
	MachVMRangeFlavorV1      MachVMRangeFlavor = 1
)

func (MachVMRangeFlavor) String added in v0.17.0

func (e MachVMRangeFlavor) String() string

String returns the MachVMRangeFlavor constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeTag added in v0.17.0

type MachVMRangeTag uint16
const (
	MachVMRangeTagDefault MachVMRangeTag = 0
	MachVMRangeTagData    MachVMRangeTag = 1
	MachVMRangeTagFixed   MachVMRangeTag = 2
)

func (MachVMRangeTag) String added in v0.17.0

func (e MachVMRangeTag) String() string

String returns the MachVMRangeTag constant's name, or its numeric form when the value is not a known constant.

type MpoFlags added in v0.17.0

type MpoFlags uint32

Bitmask — values may be combined with |.

const (
	MpoFlagsPort                        MpoFlags = 0
	MpoFlagsServicePort                 MpoFlags = 1024
	MpoFlagsConnectionPort              MpoFlags = 2048
	MpoFlagsReplyPort                   MpoFlags = 4096
	MpoFlagsWeakReplyPort               MpoFlags = 16384
	MpoFlagsNotificationPort            MpoFlags = 17408
	MpoFlagsExceptionPort               MpoFlags = 32768
	MpoFlagsConnectionPortWithPortArray MpoFlags = 65536
)

func (MpoFlags) String added in v0.17.0

func (e MpoFlags) String() string

String returns the MpoFlags constant's name, or its numeric form when the value is not a known constant.

type OSClockid added in v0.17.0

type OSClockid uint32
const (
	OSClockidTime OSClockid = 32
)

func (OSClockid) String added in v0.17.0

func (e OSClockid) String() string

String returns the OSClockid constant's name, or its numeric form when the value is not a known constant.

type Perm added in v0.17.0

type Perm int32
const (
	PermReadData           Perm = 2
	PermListDirectory      Perm = 2
	PermWriteData          Perm = 4
	PermAddFile            Perm = 4
	PermExecute            Perm = 8
	PermSearch             Perm = 8
	PermDelete             Perm = 16
	PermAppendData         Perm = 32
	PermAddSubdirectory    Perm = 32
	PermDeleteChild        Perm = 64
	PermReadAttributes     Perm = 128
	PermWriteAttributes    Perm = 256
	PermReadExtattributes  Perm = 512
	PermWriteExtattributes Perm = 1024
	PermReadSecurity       Perm = 2048
	PermWriteSecurity      Perm = 4096
	PermChangeOwner        Perm = 8192
	PermSynchronize        Perm = 1048576
)

func (Perm) String added in v0.17.0

func (e Perm) String() string

String returns the Perm constant's name, or its numeric form when the value is not a known constant.

type PtrauthKey added in v0.17.0

type PtrauthKey int32
const (
	Ptrauth_key_none                     PtrauthKey = -1
	Ptrauth_key_asia                     PtrauthKey = 0
	Ptrauth_key_asib                     PtrauthKey = 1
	Ptrauth_key_asda                     PtrauthKey = 2
	Ptrauth_key_asdb                     PtrauthKey = 3
	Ptrauth_key_process_independent_code PtrauthKey = 0
	Ptrauth_key_process_dependent_code   PtrauthKey = 1
	Ptrauth_key_process_independent_data PtrauthKey = 2
	Ptrauth_key_process_dependent_data   PtrauthKey = 3
	Ptrauth_key_return_address           PtrauthKey = 1
	Ptrauth_key_frame_pointer            PtrauthKey = 3
	Ptrauth_key_function_pointer         PtrauthKey = 0
	Ptrauth_key_block_function           PtrauthKey = 0
	Ptrauth_key_cxx_vtable_pointer       PtrauthKey = 2
	Ptrauth_key_method_list_pointer      PtrauthKey = 2
	Ptrauth_key_objc_isa_pointer         PtrauthKey = 2
	Ptrauth_key_objc_super_pointer       PtrauthKey = 2
	Ptrauth_key_objc_sel_pointer         PtrauthKey = 3
	Ptrauth_key_objc_class_ro_pointer    PtrauthKey = 2
	Ptrauth_key_block_descriptor_pointer PtrauthKey = 2
	Ptrauth_key_init_fini_pointer        PtrauthKey = 0
)

func (PtrauthKey) String added in v0.17.0

func (e PtrauthKey) String() string

String returns the PtrauthKey constant's name, or its numeric form when the value is not a known constant.

type QosClass added in v0.17.0

type QosClass uint32
const (
	QosClassUserInteractive QosClass = 33
	QosClassUserInitiated   QosClass = 25
	QosClassDefault         QosClass = 21
	QosClassUtility         QosClass = 17
	QosClassBackground      QosClass = 9
	QosClassUnspecified     QosClass = 0
)

func (QosClass) String added in v0.17.0

func (e QosClass) String() string

String returns the QosClass constant's name, or its numeric form when the value is not a known constant.

type SimpleTLVRecord added in v0.17.0

type SimpleTLVRecord struct {
	TLVRecord
}

SimpleTLVRecord is an idiomatic wrapper over the Objective-C class TKSimpleTLVRecord.

It embeds TLVRecord, promoting that type's methods.

An object that implements encoding using Simple-TLV encoding according to ISO 7816-4.

func NewSimpleTLVRecordWithTagValue added in v0.17.0

func NewSimpleTLVRecordWithTagValue(tag uint8, value []byte) *SimpleTLVRecord

NewSimpleTLVRecordWithTagValue initializes a TLV record with the specified tag and value.

func SimpleTLVRecordFromID added in v0.17.0

func SimpleTLVRecordFromID(id objc.ID) *SimpleTLVRecord

SimpleTLVRecordFromID adopts an existing Objective-C object as a SimpleTLVRecord (nil for 0), retaining it and registering a release finalizer.

type SmartCard added in v0.17.0

type SmartCard struct {
	objref.Handle
}

SmartCard is an idiomatic wrapper over the Objective-C class TKSmartCard.

A representation of a smart card.

func NewSmartCard added in v0.17.0

func NewSmartCard() *SmartCard

NewSmartCard creates a new SmartCard.

func SmartCardFromID added in v0.17.0

func SmartCardFromID(id objc.ID) *SmartCard

SmartCardFromID adopts an existing Objective-C object as a SmartCard (nil for 0), retaining it and registering a release finalizer.

func (*SmartCard) AllowedProtocols added in v0.17.0

func (sc *SmartCard) AllowedProtocols() SmartCardProtocol

AllowedProtocols returns bitmask containing allowed protocols to be used when communicating with the card. This property is consulted only during connection to the card, changes are not propagated to already connected session. By default, any protocol can be used.

func (*SmartCard) BeginSessionWithReply added in v0.18.0

func (sc *SmartCard) BeginSessionWithReply(reply func(bool, unsafe.Pointer))

BeginSessionWithReply begins a session with the Smart Card.

func (*SmartCard) Cla added in v0.17.0

func (sc *SmartCard) Cla() uint8

Cla returns CLA byte which will be used for sendIns: APDU transmits. Default value is 0x00.

func (*SmartCard) Context added in v0.17.0

func (sc *SmartCard) Context() obj.Object

Context returns user-specified context kept as long as the card is powered. Once the card is removed or another TKSmartCard object opens session, this property is automatically set to nil.

func (*SmartCard) CurrentProtocol added in v0.17.0

func (sc *SmartCard) CurrentProtocol() SmartCardProtocol

CurrentProtocol returns protocol used for communication with the SmartCard. If no card session is established, TKSmartCardProtocolNone is set.

func (*SmartCard) Description added in v0.17.0

func (sc *SmartCard) Description() string

Description returns the object's -description text.

func (*SmartCard) EndSession added in v0.17.0

func (sc *SmartCard) EndSession()

EndSession completes any pending transmissions and ends the session to the Smart Card.

func (*SmartCard) InSessionWithErrorExecuteBlock added in v0.18.0

func (sc *SmartCard) InSessionWithErrorExecuteBlock(err unsafe.Pointer, block func(unsafe.Pointer) bool) bool

InSessionWithErrorExecuteBlock synchronously begins a session, executes the given block, and ends the session.

func (*SmartCard) IsEqual added in v0.17.0

func (sc *SmartCard) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*SmartCard) IsKind added in v0.17.0

func (sc *SmartCard) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*SmartCard) SendInsP1P2DataLeReply added in v0.18.0

func (sc *SmartCard) SendInsP1P2DataLeReply(ins uint8, p1 uint8, p2 uint8, requestData []byte, le obj.Object, reply func(obj.Object, uint16, unsafe.Pointer))

SendInsP1P2DataLeReply asynchronously transmits an APDU command to the card, returning the response in a completion handler.

func (*SmartCard) SendInsP1P2DataLeSw added in v0.17.0

func (sc *SmartCard) SendInsP1P2DataLeSw(ins uint8, p1 uint8, p2 uint8, requestData []byte, le obj.Object) (result []byte, sw uint16, err error)

SendInsP1P2DataLeSw synchronously transmits an APDU command to the card and returns the response.

func (*SmartCard) Sensitive added in v0.17.0

func (sc *SmartCard) Sensitive() bool

Sensitive reports whether flag indicating whether card session should be considered as sensitive. Sensitive session always gets card after reset before communicating with it and never leaves card without reset to be used by another SmartCard object. This might be important in case that card session contain some important state which should not leak to another SmartCard object (possibly running in another, foreign application). Default is false.

func (*SmartCard) Slot added in v0.17.0

func (sc *SmartCard) Slot() *SmartCardSlot

Slot returns slot in which is this card inserted.

func (*SmartCard) String added in v0.17.0

func (sc *SmartCard) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*SmartCard) TransmitRequestReply added in v0.17.0

func (sc *SmartCard) TransmitRequestReply(ctx context.Context, request []byte) (result obj.Object, err error)

TransmitRequestReply transmits data in Application Protocol Data Unit (APDU) format to the Smart Card.

TransmitRequestReply blocks until the operation completes or ctx is cancelled.

func (*SmartCard) UseCommandChaining added in v0.17.0

func (sc *SmartCard) UseCommandChaining() bool

UseCommandChaining reports whether flag indicating whether command chaining of APDU with data field longer than 255 bytes can be used. It is automatically enabled when card announces that command chaining is supported in its ATR. However, caller can explicitly override this decision.

func (*SmartCard) UseExtendedLength added in v0.17.0

func (sc *SmartCard) UseExtendedLength() bool

UseExtendedLength reports whether flag indicating whether extended length APDUs should be used. It is automatically enabled only when used slot supports transmitting extended length commands and card announces that extended length APDU are supported in its ATR. However, caller can explicitly override this decision.

func (*SmartCard) UserInteractionForSecurePINChangeWithPINFormatAPDUCurrentPINByteOffsetNewPINByteOffset added in v0.17.0

func (sc *SmartCard) UserInteractionForSecurePINChangeWithPINFormatAPDUCurrentPINByteOffsetNewPINByteOffset(pinFormat *SmartCardPINFormat, apdu []byte, currentPINByteOffset int, newPINByteOffset int) *SmartCardUserInteractionForSecurePINChange

UserInteractionForSecurePINChangeWithPINFormatAPDUCurrentPINByteOffsetNewPINByteOffset creates a new user interaction object for secure PIN change using the smart card reader facilities (typically a HW keypad).

func (*SmartCard) UserInteractionForSecurePINVerificationWithPINFormatAPDUPINByteOffset added in v0.17.0

func (sc *SmartCard) UserInteractionForSecurePINVerificationWithPINFormatAPDUPINByteOffset(pinFormat *SmartCardPINFormat, apdu []byte, pinByteOffset int) *SmartCardUserInteractionForSecurePINVerification

UserInteractionForSecurePINVerificationWithPINFormatAPDUPINByteOffset creates and returns a new user interaction object for secure PIN verification using the Smart Card reader facilities.

func (*SmartCard) Valid added in v0.17.0

func (sc *SmartCard) Valid() bool

Valid reports whether flag indicating whether card is valid, i.e. it was not removed from the reader. Use Key-Value-Observing to be notified about card removal.

func (*SmartCard) WithAllowedProtocols added in v0.17.0

func (sc *SmartCard) WithAllowedProtocols(allowedProtocols SmartCardProtocol) *SmartCard

WithAllowedProtocols sets the protocols allowed for communication with the Smart Card. TKSmartCardProtocolAny by default.

func (*SmartCard) WithCla added in v0.17.0

func (sc *SmartCard) WithCla(cla uint8) *SmartCard

WithCla sets the CLA byte used for APDU transmission. 0x00 by default.

func (*SmartCard) WithContext added in v0.17.0

func (sc *SmartCard) WithContext(context_ obj.Object) *SmartCard

WithContext sets user-specified information. This property is automatically set to nil if the Smart Card is removed or another TKSmartCard object begins a session.

func (*SmartCard) WithSensitive added in v0.17.0

func (sc *SmartCard) WithSensitive(sensitive bool) *SmartCard

WithSensitive sets whether sessions established for the Smart Card should be considered sensitive. false by default.

func (*SmartCard) WithUseCommandChaining added in v0.17.0

func (sc *SmartCard) WithUseCommandChaining(useCommandChaining bool) *SmartCard

WithUseCommandChaining sets whether to use command chaining of APDU with a data field longer than 255 bytes.

func (*SmartCard) WithUseExtendedLength added in v0.17.0

func (sc *SmartCard) WithUseExtendedLength(useExtendedLength bool) *SmartCard

WithUseExtendedLength sets whether to use extended length APDU.

type SmartCardATR added in v0.17.0

type SmartCardATR struct {
	objref.Handle
}

SmartCardATR is an idiomatic wrapper over the Objective-C class TKSmartCardATR.

A parsed ATR (Answer To Reset) message from a Smart Card.

func NewSmartCardATRWithBytes added in v0.17.0

func NewSmartCardATRWithBytes(data []byte) *SmartCardATR

NewSmartCardATRWithBytes initializes a TKSmartCardATR object from a provided data object.

func NewSmartCardATRWithSource added in v0.17.0

func NewSmartCardATRWithSource(source func() int) *SmartCardATR

NewSmartCardATRWithSource initializes a TKSmartCardATR object from a provided data source.

func SmartCardATRFromID added in v0.17.0

func SmartCardATRFromID(id objc.ID) *SmartCardATR

SmartCardATRFromID adopts an existing Objective-C object as a SmartCardATR (nil for 0), retaining it and registering a release finalizer.

func (*SmartCardATR) Bytes added in v0.17.0

func (sca *SmartCardATR) Bytes() []byte

Bytes returns full ATR as string of bytes

func (*SmartCardATR) Description added in v0.17.0

func (sca *SmartCardATR) Description() string

Description returns the object's -description text.

func (*SmartCardATR) HistoricalBytes added in v0.17.0

func (sca *SmartCardATR) HistoricalBytes() []byte

HistoricalBytes returns just historical bytes of ATR, without Tck and interface bytes.

func (*SmartCardATR) HistoricalRecords added in v0.17.0

func (sca *SmartCardATR) HistoricalRecords() []*CompactTLVRecord

HistoricalRecords returns an array of TKCompactTLVRecord instances with TLV records parsed from historical bytes. If historical bytes are not structured using Compact TLV encoding, nil is returned.

HistoricalRecords returns the collection as a Go slice.

func (*SmartCardATR) InterfaceGroupAtIndex added in v0.17.0

func (sca *SmartCardATR) InterfaceGroupAtIndex(index int) *SmartCardATRInterfaceGroup

InterfaceGroupAtIndex returns the interface group at the specified index.

func (*SmartCardATR) InterfaceGroupForProtocol added in v0.17.0

func (sca *SmartCardATR) InterfaceGroupForProtocol(protocol SmartCardProtocol) *SmartCardATRInterfaceGroup

InterfaceGroupForProtocol returns the interface group with the specified protocol.

func (*SmartCardATR) IsEqual added in v0.17.0

func (sca *SmartCardATR) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*SmartCardATR) IsKind added in v0.17.0

func (sca *SmartCardATR) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*SmartCardATR) Protocols added in v0.17.0

func (sca *SmartCardATR) Protocols() []obj.Object

Protocols returns array of NSNumber of protocols indicated in ATR, in the correct order (i.e. the default protocol comes first), duplicates sorted out.

Protocols returns the collection as a Go slice.

func (*SmartCardATR) String added in v0.17.0

func (sca *SmartCardATR) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type SmartCardATRInterfaceGroup added in v0.17.0

type SmartCardATRInterfaceGroup struct {
	objref.Handle
}

SmartCardATRInterfaceGroup is an idiomatic wrapper over the Objective-C class TKSmartCardATRInterfaceGroup.

A single interface-bytes group for a Smart Card ATR (Answer to Reset).

func NewSmartCardATRInterfaceGroup added in v0.17.0

func NewSmartCardATRInterfaceGroup() *SmartCardATRInterfaceGroup

NewSmartCardATRInterfaceGroup creates a new SmartCardATRInterfaceGroup.

func SmartCardATRInterfaceGroupFromID added in v0.17.0

func SmartCardATRInterfaceGroupFromID(id objc.ID) *SmartCardATRInterfaceGroup

SmartCardATRInterfaceGroupFromID adopts an existing Objective-C object as a SmartCardATRInterfaceGroup (nil for 0), retaining it and registering a release finalizer.

func (*SmartCardATRInterfaceGroup) Description added in v0.17.0

func (scaig *SmartCardATRInterfaceGroup) Description() string

Description returns the object's -description text.

func (*SmartCardATRInterfaceGroup) IsEqual added in v0.17.0

func (scaig *SmartCardATRInterfaceGroup) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*SmartCardATRInterfaceGroup) IsKind added in v0.17.0

func (scaig *SmartCardATRInterfaceGroup) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*SmartCardATRInterfaceGroup) Protocol added in v0.17.0

func (scaig *SmartCardATRInterfaceGroup) Protocol() *foundation.Number

Protocol returns protocol number for this group. First group (global) has protocol unassigned, contains nil.

func (*SmartCardATRInterfaceGroup) String added in v0.17.0

func (scaig *SmartCardATRInterfaceGroup) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*SmartCardATRInterfaceGroup) TA added in v0.17.0

TA returns TA interface byte of ATR group, or nil if TA is not present.

func (*SmartCardATRInterfaceGroup) TB added in v0.17.0

TB returns TB interface byte of ATR group, or nil if TB is not present.

func (*SmartCardATRInterfaceGroup) TC added in v0.17.0

TC returns TC interface byte of ATR group, or nil if TC is not present.

type SmartCardPINCharset added in v0.17.0

type SmartCardPINCharset int64

Possible PIN character sets.

const (
	// PIN is only composed of digits.
	SmartCardPINCharsetNumeric SmartCardPINCharset = 0
	// PIN can be composed of digits and letters.
	SmartCardPINCharsetAlphanumeric SmartCardPINCharset = 1
	// PIN can be composed of digits and uppercase letters.
	SmartCardPINCharsetUpperAlphanumeric SmartCardPINCharset = 2
)

func (SmartCardPINCharset) String added in v0.17.0

func (e SmartCardPINCharset) String() string

String returns the SmartCardPINCharset constant's name, or its numeric form when the value is not a known constant.

type SmartCardPINCompletion added in v0.17.0

type SmartCardPINCompletion uint64

Bitmask — values may be combined with |.

const (
	// Completion by reaching the maximum PIN length.
	SmartCardPINCompletionMaxLength SmartCardPINCompletion = 1
	// Completion by pressing the validation key.
	SmartCardPINCompletionKey SmartCardPINCompletion = 2
	// Completion by timeout expiration.
	SmartCardPINCompletionTimeout SmartCardPINCompletion = 4
)

func (SmartCardPINCompletion) String added in v0.17.0

func (e SmartCardPINCompletion) String() string

String returns the SmartCardPINCompletion constant's name, or its numeric form when the value is not a known constant.

type SmartCardPINConfirmation added in v0.17.0

type SmartCardPINConfirmation uint64

Bitmask — values may be combined with |.

const (
	// No confirmation requested.
	SmartCardPINConfirmationNone SmartCardPINConfirmation = 0
	// Confirmation (entry) of the new PIN requested.
	SmartCardPINConfirmationNew SmartCardPINConfirmation = 1
	// Confirmation (entry) of the current PIN requested.
	SmartCardPINConfirmationCurrent SmartCardPINConfirmation = 2
)

func (SmartCardPINConfirmation) String added in v0.17.0

func (e SmartCardPINConfirmation) String() string

String returns the SmartCardPINConfirmation constant's name, or its numeric form when the value is not a known constant.

type SmartCardPINEncoding added in v0.17.0

type SmartCardPINEncoding int64

Possible PIN encoding types.

const (
	// Characters are encoded in Binary format (1234 => 01h 02h 03h 04h).
	SmartCardPINEncodingBinary SmartCardPINEncoding = 0
	// Characters are encoded in ASCII format (1234 => 31h 32h 33h 34h).
	SmartCardPINEncodingASCII SmartCardPINEncoding = 1
	// Characters (only digits) are encoded in BCD format (1234 => 12h 34h).
	SmartCardPINEncodingBCD SmartCardPINEncoding = 2
)

func (SmartCardPINEncoding) String added in v0.17.0

func (e SmartCardPINEncoding) String() string

String returns the SmartCardPINEncoding constant's name, or its numeric form when the value is not a known constant.

type SmartCardPINFormat added in v0.17.0

type SmartCardPINFormat struct {
	objref.Handle
}

SmartCardPINFormat is an idiomatic wrapper over the Objective-C class TKSmartCardPINFormat.

The formatting properties for a PIN, such as character encoding and length constraints.

func NewSmartCardPINFormat added in v0.17.0

func NewSmartCardPINFormat() *SmartCardPINFormat

NewSmartCardPINFormat creates a new SmartCardPINFormat.

func SmartCardPINFormatFromID added in v0.17.0

func SmartCardPINFormatFromID(id objc.ID) *SmartCardPINFormat

SmartCardPINFormatFromID adopts an existing Objective-C object as a SmartCardPINFormat (nil for 0), retaining it and registering a release finalizer.

func (*SmartCardPINFormat) Charset added in v0.17.0

func (scpf *SmartCardPINFormat) Charset() SmartCardPINCharset

Charset returns format of PIN characters.

func (*SmartCardPINFormat) Description added in v0.17.0

func (scpf *SmartCardPINFormat) Description() string

Description returns the object's -description text.

func (*SmartCardPINFormat) Encoding added in v0.17.0

func (scpf *SmartCardPINFormat) Encoding() SmartCardPINEncoding

Encoding returns encoding of PIN characters.

func (*SmartCardPINFormat) IsEqual added in v0.17.0

func (scpf *SmartCardPINFormat) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*SmartCardPINFormat) IsKind added in v0.17.0

func (scpf *SmartCardPINFormat) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*SmartCardPINFormat) MaxPINLength added in v0.17.0

func (scpf *SmartCardPINFormat) MaxPINLength() int

MaxPINLength returns maximum number of characters to form a valid PIN.

func (*SmartCardPINFormat) MinPINLength added in v0.17.0

func (scpf *SmartCardPINFormat) MinPINLength() int

MinPINLength returns minimum number of characters to form a valid PIN.

func (*SmartCardPINFormat) PINBitOffset added in v0.17.0

func (scpf *SmartCardPINFormat) PINBitOffset() int

PINBitOffset returns offset in bits within the PIN block to mark a location for filling in the formatted PIN (justified with respect to PINJustification). The offset, in bits, within the PIN block to mark a location for filling in the formatted PIN, which is justified with respect to the PINJustification property value.

func (*SmartCardPINFormat) PINBlockByteLength added in v0.17.0

func (scpf *SmartCardPINFormat) PINBlockByteLength() int

PINBlockByteLength returns total length of the PIN block in bytes.

func (*SmartCardPINFormat) PINJustification added in v0.17.0

func (scpf *SmartCardPINFormat) PINJustification() SmartCardPINJustification

PINJustification returns PIN justification within the PIN block.

func (*SmartCardPINFormat) PINLengthBitOffset added in v0.17.0

func (scpf *SmartCardPINFormat) PINLengthBitOffset() int

PINLengthBitOffset returns offset in bits within the PIN block to mark a location for filling in the PIN length (always left justified). The offset, in bits, within the PIN block to mark a location for filling in the PIN length, which is always left justified.

func (*SmartCardPINFormat) PINLengthBitSize added in v0.17.0

func (scpf *SmartCardPINFormat) PINLengthBitSize() int

PINLengthBitSize returns size in bits of the PIN length field. If set to 0, PIN length is not written.

func (*SmartCardPINFormat) String added in v0.17.0

func (scpf *SmartCardPINFormat) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*SmartCardPINFormat) WithCharset added in v0.17.0

func (scpf *SmartCardPINFormat) WithCharset(charset SmartCardPINCharset) *SmartCardPINFormat

WithCharset sets the format of PIN characters. TKSmartCardPINCharsetNumeric by default.

func (*SmartCardPINFormat) WithEncoding added in v0.17.0

func (scpf *SmartCardPINFormat) WithEncoding(encoding SmartCardPINEncoding) *SmartCardPINFormat

WithEncoding sets the encoding of PIN characters. TKSmartCardPINEncodingASCII by default.

func (*SmartCardPINFormat) WithMaxPINLength added in v0.17.0

func (scpf *SmartCardPINFormat) WithMaxPINLength(maxPINLength int) *SmartCardPINFormat

WithMaxPINLength sets the maximum number of characters to form a valid PIN. 8 by default.

func (*SmartCardPINFormat) WithMinPINLength added in v0.17.0

func (scpf *SmartCardPINFormat) WithMinPINLength(minPINLength int) *SmartCardPINFormat

WithMinPINLength sets the minimum number of characters to form a valid PIN. 4 by default.

func (*SmartCardPINFormat) WithPINBitOffset added in v0.17.0

func (scpf *SmartCardPINFormat) WithPINBitOffset(pinBitOffset int) *SmartCardPINFormat

WithPINBitOffset sets the offset, in bits, within the PIN block to mark a location for filling in the formatted PIN, which is justified with respect to the PINJustification property value. 0 by default.

func (*SmartCardPINFormat) WithPINBlockByteLength added in v0.17.0

func (scpf *SmartCardPINFormat) WithPINBlockByteLength(pinBlockByteLength int) *SmartCardPINFormat

WithPINBlockByteLength sets the total length of the PIN block in bytes. 8 by default.

func (*SmartCardPINFormat) WithPINJustification added in v0.17.0

func (scpf *SmartCardPINFormat) WithPINJustification(pinJustification SmartCardPINJustification) *SmartCardPINFormat

WithPINJustification sets the justification within the PIN block. TKSmartCardPINJustificationLeft by default.

func (*SmartCardPINFormat) WithPINLengthBitOffset added in v0.17.0

func (scpf *SmartCardPINFormat) WithPINLengthBitOffset(pinLengthBitOffset int) *SmartCardPINFormat

WithPINLengthBitOffset sets the offset, in bits, within the PIN block to mark a location for filling in the PIN length, which is always left justified. 0 by default.

func (*SmartCardPINFormat) WithPINLengthBitSize added in v0.17.0

func (scpf *SmartCardPINFormat) WithPINLengthBitSize(pinLengthBitSize int) *SmartCardPINFormat

WithPINLengthBitSize sets the size, in bits, of the PIN length field. If set to 0, PIN length is not written. 0 by default.

type SmartCardPINJustification added in v0.17.0

type SmartCardPINJustification int64

Possible PIN justification types

const (
	// Justify to the left.
	SmartCardPINJustificationLeft SmartCardPINJustification = 0
	// Justify to the right.
	SmartCardPINJustificationRight SmartCardPINJustification = 1
)

func (SmartCardPINJustification) String added in v0.17.0

func (e SmartCardPINJustification) String() string

String returns the SmartCardPINJustification constant's name, or its numeric form when the value is not a known constant.

type SmartCardProtocol added in v0.17.0

type SmartCardProtocol uint64

Smart Card transmission protocols. Bitmask — values may be combined with |.

const (
	SmartCardProtocolNone SmartCardProtocol = 0
	SmartCardProtocolT0   SmartCardProtocol = 1
	SmartCardProtocolT1   SmartCardProtocol = 2
	SmartCardProtocolT15  SmartCardProtocol = 32768
	SmartCardProtocolAny  SmartCardProtocol = 65535
)

func (SmartCardProtocol) String added in v0.17.0

func (e SmartCardProtocol) String() string

String returns the SmartCardProtocol constant's name, or its numeric form when the value is not a known constant.

type SmartCardSlot added in v0.17.0

type SmartCardSlot struct {
	objref.Handle
}

SmartCardSlot is an idiomatic wrapper over the Objective-C class TKSmartCardSlot.

A single smart card reader slot in the system.

func NewSmartCardSlot added in v0.17.0

func NewSmartCardSlot() *SmartCardSlot

NewSmartCardSlot creates a new SmartCardSlot.

func SmartCardSlotFromID added in v0.17.0

func SmartCardSlotFromID(id objc.ID) *SmartCardSlot

SmartCardSlotFromID adopts an existing Objective-C object as a SmartCardSlot (nil for 0), retaining it and registering a release finalizer.

func (*SmartCardSlot) ATR added in v0.17.0

func (scs *SmartCardSlot) ATR() *SmartCardATR

ATR returns ATR of the inserted SmartCard, or nil if no or mute SmartCard is inserted.

func (*SmartCardSlot) Description added in v0.17.0

func (scs *SmartCardSlot) Description() string

Description returns the object's -description text.

func (*SmartCardSlot) IsEqual added in v0.17.0

func (scs *SmartCardSlot) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*SmartCardSlot) IsKind added in v0.17.0

func (scs *SmartCardSlot) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*SmartCardSlot) MakeSmartCard added in v0.17.0

func (scs *SmartCardSlot) MakeSmartCard() *SmartCard

MakeSmartCard creates a new TKSmartCard object representing the currently inserted Smart Card.

func (*SmartCardSlot) MaxInputLength added in v0.17.0

func (scs *SmartCardSlot) MaxInputLength() int

MaxInputLength returns maximal length of input APDU that the slot is able to transfer to the card.

func (*SmartCardSlot) MaxOutputLength added in v0.17.0

func (scs *SmartCardSlot) MaxOutputLength() int

MaxOutputLength returns maximal length of output APDU that the slot is able to transfer from the card.

func (*SmartCardSlot) Name added in v0.17.0

func (scs *SmartCardSlot) Name() string

Name returns name of the SmartCard reader slot.

func (*SmartCardSlot) State added in v0.17.0

func (scs *SmartCardSlot) State() SmartCardSlotState

State returns current state of the slot. Use KVO to be notified about state changes.

func (*SmartCardSlot) String added in v0.17.0

func (scs *SmartCardSlot) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type SmartCardSlotManager added in v0.17.0

type SmartCardSlotManager struct {
	objref.Handle
}

SmartCardSlotManager is an idiomatic wrapper over the Objective-C class TKSmartCardSlotManager.

An interface to all available smart card reader slots.

func DefaultManager added in v0.17.0

func DefaultManager() *SmartCardSlotManager

DefaultManager returns global pool of SmartCard reader slots. macOS: Note that defaultManager instance is accessible only if the calling application has 'com.apple.security.smartcard' entitlement set to Boolean:YES. If the calling application does not have this entitlement, defaultManager is always set to nil. iOS: The defaultManager instance is always accessible.

func NewSmartCardSlotManager added in v0.17.0

func NewSmartCardSlotManager() *SmartCardSlotManager

NewSmartCardSlotManager creates a new SmartCardSlotManager.

func SmartCardSlotManagerFromID added in v0.17.0

func SmartCardSlotManagerFromID(id objc.ID) *SmartCardSlotManager

SmartCardSlotManagerFromID adopts an existing Objective-C object as a SmartCardSlotManager (nil for 0), retaining it and registering a release finalizer.

func (*SmartCardSlotManager) Description added in v0.17.0

func (scsm *SmartCardSlotManager) Description() string

Description returns the object's -description text.

func (*SmartCardSlotManager) GetSlotWithNameReply added in v0.17.0

func (scsm *SmartCardSlotManager) GetSlotWithNameReply(ctx context.Context, name string) (result *SmartCardSlot, err error)

GetSlotWithNameReply asynchronously calls a block with a Smart Card reader slot for a specified name.

GetSlotWithNameReply blocks until the operation completes or ctx is cancelled.

func (*SmartCardSlotManager) IsEqual added in v0.17.0

func (scsm *SmartCardSlotManager) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*SmartCardSlotManager) IsKind added in v0.17.0

func (scsm *SmartCardSlotManager) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*SmartCardSlotManager) SlotNamed added in v0.17.0

func (scsm *SmartCardSlotManager) SlotNamed(name string) *SmartCardSlot

SlotNamed returns the Smart Card slot with a given name.

func (*SmartCardSlotManager) SlotNames added in v0.17.0

func (scsm *SmartCardSlotManager) SlotNames() []string

SlotNames returns array of currently known slots in the system. Slots are identified by NSString name instances. Use KVO to be notified about slots arrivals and removals.

SlotNames returns the collection as a Go slice.

func (*SmartCardSlotManager) String added in v0.17.0

func (scsm *SmartCardSlotManager) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type SmartCardSlotState added in v0.17.0

type SmartCardSlotState int64

All smart card slot states.

const (
	// Slot is no longer known to the system.  This is terminal state for TKSmartCardSlot instance, once reached, the slot instance can never be revived.
	SmartCardSlotStateMissing SmartCardSlotState = 0
	// The slot is empty, no card is inserted.
	SmartCardSlotStateEmpty SmartCardSlotState = 1
	// The card was inserted into the slot and an initial probe is in progress.
	SmartCardSlotStateProbing SmartCardSlotState = 2
	// The card inserted in the slot does not answer.
	SmartCardSlotStateMuteCard SmartCardSlotState = 3
	// Card properly answered to reset.
	SmartCardSlotStateValidCard SmartCardSlotState = 4
)

func (SmartCardSlotState) String added in v0.17.0

func (e SmartCardSlotState) String() string

String returns the SmartCardSlotState constant's name, or its numeric form when the value is not a known constant.

type SmartCardToken added in v0.17.0

type SmartCardToken struct {
	Token
}

SmartCardToken is an idiomatic wrapper over the Objective-C class TKSmartCardToken.

It embeds Token, promoting that type's methods.

A representation of a smart card based cryptographic token.

func NewSmartCardTokenWithSmartCardAIDInstanceIDTokenDriver added in v0.17.0

func NewSmartCardTokenWithSmartCardAIDInstanceIDTokenDriver(smartCard *SmartCard, aid []byte, instanceID string, tokenDriver *SmartCardTokenDriver) *SmartCardToken

NewSmartCardTokenWithSmartCardAIDInstanceIDTokenDriver initializes a smart card token with the specified smart card, application identifier, and token driver.

func SmartCardTokenFromID added in v0.17.0

func SmartCardTokenFromID(id objc.ID) *SmartCardToken

SmartCardTokenFromID adopts an existing Objective-C object as a SmartCardToken (nil for 0), retaining it and registering a release finalizer.

func (*SmartCardToken) AID added in v0.17.0

func (sct *SmartCardToken) AID() []byte

AID returns this is AID which is specified in extension's plist NSExtensionAttributes as

type SmartCardTokenDriver added in v0.17.0

type SmartCardTokenDriver struct {
	TokenDriver
}

SmartCardTokenDriver is an idiomatic wrapper over the Objective-C class TKSmartCardTokenDriver.

It embeds TokenDriver, promoting that type's methods.

The driver that acts as an entry point for smart card app extensions.

func NewSmartCardTokenDriver added in v0.17.0

func NewSmartCardTokenDriver() *SmartCardTokenDriver

NewSmartCardTokenDriver creates a new SmartCardTokenDriver.

func SmartCardTokenDriverFromID added in v0.17.0

func SmartCardTokenDriverFromID(id objc.ID) *SmartCardTokenDriver

SmartCardTokenDriverFromID adopts an existing Objective-C object as a SmartCardTokenDriver (nil for 0), retaining it and registering a release finalizer.

func (*SmartCardTokenDriver) WithDelegate added in v0.17.0

func (sctd *SmartCardTokenDriver) WithDelegate(delegate TokenDriverDelegate) *SmartCardTokenDriver

WithDelegate sets the token driver delegate.

type SmartCardTokenDriverDelegate added in v0.17.0

type SmartCardTokenDriverDelegate interface {
	TokenDriverCreateTokenForSmartCardAIDError(driver *SmartCardTokenDriver, smartCard *SmartCard, aid []byte) *SmartCardToken
}

SmartCardTokenDriverDelegate is the Go form of the Objective-C protocol TKSmartCardTokenDriverDelegate.

type SmartCardTokenSession added in v0.17.0

type SmartCardTokenSession struct {
	TokenSession
}

SmartCardTokenSession is an idiomatic wrapper over the Objective-C class TKSmartCardTokenSession.

It embeds TokenSession, promoting that type's methods.

A token session that is based on a smart card token.

func NewSmartCardTokenSession added in v0.17.0

func NewSmartCardTokenSession() *SmartCardTokenSession

NewSmartCardTokenSession creates a new SmartCardTokenSession.

func SmartCardTokenSessionFromID added in v0.17.0

func SmartCardTokenSessionFromID(id objc.ID) *SmartCardTokenSession

SmartCardTokenSessionFromID adopts an existing Objective-C object as a SmartCardTokenSession (nil for 0), retaining it and registering a release finalizer.

func (*SmartCardTokenSession) GetSmartCard added in v0.17.0

func (scts *SmartCardTokenSession) GetSmartCard() (result *SmartCard, err error)

GetSmartCard returns a TKSmartCard instance with an active exclusive session and the SmartCard application selected. Replaces the deprecated The TKSmartCard object is only accessible within the methods of the TKTokenSessionDelegate protocol. If the associated token has an AID set, the returned card will have an exclusive session already opened and the specified application selected. In this scenario: Do not call -[TKSmartCard beginSessionWithReply:]) on the returned SmartCard instance. The system manages the session lifecycle and will terminate it automatically when the current token request servicing is finished. Do not call -[TKSmartCard endSession]. You can use the `smartCard.context` property to store any context-specific state information related to the card. This property is automatically set to `nil` if the card is reset or accessed by a different TKSmartCard instance (potentially in another process). Before performing an operation, check the `TKSmartCard.context` property for a previously stored value. This can help you avoid potentially costly restoration of the SmartCard state if it's already available.

func (*SmartCardTokenSession) SmartCard added in v0.17.0

func (scts *SmartCardTokenSession) SmartCard() *SmartCard

SmartCard contains TKSmartCard instance with active exclusive session and SmartCard application selected. This property can be accessed only when handling one of the methods of TKTokenSessionDelegate protocol. If associated token has set AID property, then the returned card has opened exclusive session to the card and the application is already selected. Therefore there is no need to call -[TKSmartCard beginSessionWithReply:]) on returned SmartCard instance in such case and system will take care of terminating session when current token request servicing is finished, -[TKSmartCard endSession] must not be called either. You can store any kind of context state information representing state of the card into smartCard.context property. This property will be automatically set to nil if the card is reset or accessed by different TKSmartCard instance (possibly in another process). Checking TKSmartCard.context property for previously stored value can be used to avoid potentially costly restoring of SmartCard state before performing the operation.

func (*SmartCardTokenSession) WithDelegate added in v0.17.0

WithDelegate sets the token session delegate.

type SmartCardUserInteraction added in v0.17.0

type SmartCardUserInteraction struct {
	objref.Handle
}

SmartCardUserInteraction is an idiomatic wrapper over the Objective-C class TKSmartCardUserInteraction.

SmartCardUserInteraction is an abstract base — you do not construct it directly. Construct one of SmartCardUserInteractionForPINOperation and pass it where a SmartCardUserInteraction is accepted.

The base class for encapsulating user interaction with a Smart Card reader.

func SmartCardUserInteractionFromID added in v0.17.0

func SmartCardUserInteractionFromID(id objc.ID) *SmartCardUserInteraction

SmartCardUserInteractionFromID adopts an existing Objective-C object as a SmartCardUserInteraction (nil for 0), retaining it and registering a release finalizer.

func (*SmartCardUserInteraction) Cancel added in v0.17.0

func (scui *SmartCardUserInteraction) Cancel() bool

Cancel reports whether attempts to cancel an interaction started by calling runWithReply:. For certain interactions, cancellation may not be available.

func (*SmartCardUserInteraction) Description added in v0.17.0

func (scui *SmartCardUserInteraction) Description() string

Description returns the object's -description text.

func (*SmartCardUserInteraction) InteractionTimeout added in v0.17.0

func (scui *SmartCardUserInteraction) InteractionTimeout() float64

InteractionTimeout returns timeout after the first key stroke. If set to 0, the reader-defined default timeout is used.

func (*SmartCardUserInteraction) IsEqual added in v0.17.0

func (scui *SmartCardUserInteraction) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*SmartCardUserInteraction) IsKind added in v0.17.0

func (scui *SmartCardUserInteraction) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*SmartCardUserInteraction) RunWithReply added in v0.18.0

func (scui *SmartCardUserInteraction) RunWithReply(reply func(bool, unsafe.Pointer))

RunWithReply runs the user interaction and asynchronously receives a reply.

func (*SmartCardUserInteraction) String added in v0.17.0

func (scui *SmartCardUserInteraction) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*SmartCardUserInteraction) WithDelegate added in v0.17.0

WithDelegate sets the delegate for observing events that occur during the user interaction.

func (*SmartCardUserInteraction) WithInitialTimeout added in v0.17.0

func (scui *SmartCardUserInteraction) WithInitialTimeout(initialTimeout float64) *SmartCardUserInteraction

WithInitialTimeout sets the timeout, in seconds, for initial interaction. If set to 0, the reader-defined default timeout is used. 0 by default.

func (*SmartCardUserInteraction) WithInteractionTimeout added in v0.17.0

func (scui *SmartCardUserInteraction) WithInteractionTimeout(interactionTimeout float64) *SmartCardUserInteraction

WithInteractionTimeout sets the timeout, in seconds, after the first key stroke. If set to 0, the reader-defined default timeout is used. 0 by default.

type SmartCardUserInteractionDelegate added in v0.17.0

type SmartCardUserInteractionDelegate interface {
}

SmartCardUserInteractionDelegate receives the callbacks of the Objective-C protocol TKSmartCardUserInteractionDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (SmartCardUserInteractionDelegate…Handler): implement the ones you need on the same value and the framework will call them too.

type SmartCardUserInteractionDelegateCharacterEnteredInUserInteractionHandler added in v0.17.0

type SmartCardUserInteractionDelegateCharacterEnteredInUserInteractionHandler interface {
	CharacterEnteredInUserInteraction(interaction *SmartCardUserInteraction)
}

SmartCardUserInteractionDelegateCharacterEnteredInUserInteractionHandler is the optional TKSmartCardUserInteractionDelegate method characterEnteredInUserInteraction:. Implement it on a SmartCardUserInteractionDelegate value to receive that callback; a value without it is simply never sent one.

type SmartCardUserInteractionDelegateCorrectionKeyPressedInUserInteractionHandler added in v0.17.0

type SmartCardUserInteractionDelegateCorrectionKeyPressedInUserInteractionHandler interface {
	CorrectionKeyPressedInUserInteraction(interaction *SmartCardUserInteraction)
}

SmartCardUserInteractionDelegateCorrectionKeyPressedInUserInteractionHandler is the optional TKSmartCardUserInteractionDelegate method correctionKeyPressedInUserInteraction:. Implement it on a SmartCardUserInteractionDelegate value to receive that callback; a value without it is simply never sent one.

type SmartCardUserInteractionDelegateInvalidCharacterEnteredInUserInteractionHandler added in v0.17.0

type SmartCardUserInteractionDelegateInvalidCharacterEnteredInUserInteractionHandler interface {
	InvalidCharacterEnteredInUserInteraction(interaction *SmartCardUserInteraction)
}

SmartCardUserInteractionDelegateInvalidCharacterEnteredInUserInteractionHandler is the optional TKSmartCardUserInteractionDelegate method invalidCharacterEnteredInUserInteraction:. Implement it on a SmartCardUserInteractionDelegate value to receive that callback; a value without it is simply never sent one.

type SmartCardUserInteractionDelegateNewPINConfirmationRequestedInUserInteractionHandler added in v0.17.0

type SmartCardUserInteractionDelegateNewPINConfirmationRequestedInUserInteractionHandler interface {
	NewPINConfirmationRequestedInUserInteraction(interaction *SmartCardUserInteraction)
}

SmartCardUserInteractionDelegateNewPINConfirmationRequestedInUserInteractionHandler is the optional TKSmartCardUserInteractionDelegate method newPINConfirmationRequestedInUserInteraction:. Implement it on a SmartCardUserInteractionDelegate value to receive that callback; a value without it is simply never sent one.

type SmartCardUserInteractionDelegateNewPINRequestedInUserInteractionHandler added in v0.17.0

type SmartCardUserInteractionDelegateNewPINRequestedInUserInteractionHandler interface {
	NewPINRequestedInUserInteraction(interaction *SmartCardUserInteraction)
}

SmartCardUserInteractionDelegateNewPINRequestedInUserInteractionHandler is the optional TKSmartCardUserInteractionDelegate method newPINRequestedInUserInteraction:. Implement it on a SmartCardUserInteractionDelegate value to receive that callback; a value without it is simply never sent one.

type SmartCardUserInteractionDelegateOldPINRequestedInUserInteractionHandler added in v0.17.0

type SmartCardUserInteractionDelegateOldPINRequestedInUserInteractionHandler interface {
	OldPINRequestedInUserInteraction(interaction *SmartCardUserInteraction)
}

SmartCardUserInteractionDelegateOldPINRequestedInUserInteractionHandler is the optional TKSmartCardUserInteractionDelegate method oldPINRequestedInUserInteraction:. Implement it on a SmartCardUserInteractionDelegate value to receive that callback; a value without it is simply never sent one.

type SmartCardUserInteractionDelegateValidationKeyPressedInUserInteractionHandler added in v0.17.0

type SmartCardUserInteractionDelegateValidationKeyPressedInUserInteractionHandler interface {
	ValidationKeyPressedInUserInteraction(interaction *SmartCardUserInteraction)
}

SmartCardUserInteractionDelegateValidationKeyPressedInUserInteractionHandler is the optional TKSmartCardUserInteractionDelegate method validationKeyPressedInUserInteraction:. Implement it on a SmartCardUserInteractionDelegate value to receive that callback; a value without it is simply never sent one.

type SmartCardUserInteractionForPINOperation added in v0.17.0

type SmartCardUserInteractionForPINOperation struct {
	SmartCardUserInteraction
}

SmartCardUserInteractionForPINOperation is an idiomatic wrapper over the Objective-C class TKSmartCardUserInteractionForPINOperation.

SmartCardUserInteractionForPINOperation is an abstract base — you do not construct it directly. Construct one of SmartCardUserInteractionForSecurePINChange, SmartCardUserInteractionForSecurePINVerification and pass it where a SmartCardUserInteractionForPINOperation is accepted.

A representation of user interaction for secure PIN operations on a Smart Card reader.

func SmartCardUserInteractionForPINOperationFromID added in v0.17.0

func SmartCardUserInteractionForPINOperationFromID(id objc.ID) *SmartCardUserInteractionForPINOperation

SmartCardUserInteractionForPINOperationFromID adopts an existing Objective-C object as a SmartCardUserInteractionForPINOperation (nil for 0), retaining it and registering a release finalizer.

func (*SmartCardUserInteractionForPINOperation) Locale added in v0.17.0

Locale returns locale defining the language of displayed messages. If set to nil, the user's current locale is used.

func (*SmartCardUserInteractionForPINOperation) PINCompletion added in v0.17.0

PINCompletion returns bitmask specifying condition(s) under which PIN entry should be considered complete.

func (*SmartCardUserInteractionForPINOperation) PINMessageIndices added in v0.17.0

func (scuifpo *SmartCardUserInteractionForPINOperation) PINMessageIndices() []obj.Object

PINMessageIndices returns list of message indices referring to a predefined message table. It is used to specify the type and number of messages displayed during the PIN operation. If nil, the reader does not display any message (reader specific). Typically, PIN verification takes 1 message, PIN modification 1-3 messages.

PINMessageIndices returns the collection as a Go slice.

func (*SmartCardUserInteractionForPINOperation) ResultData added in v0.17.0

func (scuifpo *SmartCardUserInteractionForPINOperation) ResultData() []byte

ResultData returns optional block of returned data (without SW1SW2 bytes).

func (*SmartCardUserInteractionForPINOperation) ResultSW added in v0.17.0

func (scuifpo *SmartCardUserInteractionForPINOperation) ResultSW() uint16

ResultSW returns SW1SW2 result code.

func (*SmartCardUserInteractionForPINOperation) WithDelegate added in v0.17.0

WithDelegate sets the delegate for observing events that occur during the user interaction.

func (*SmartCardUserInteractionForPINOperation) WithInitialTimeout added in v0.17.0

WithInitialTimeout sets the timeout, in seconds, for initial interaction. If set to 0, the reader-defined default timeout is used. 0 by default.

func (*SmartCardUserInteractionForPINOperation) WithInteractionTimeout added in v0.17.0

func (scuifpo *SmartCardUserInteractionForPINOperation) WithInteractionTimeout(interactionTimeout float64) *SmartCardUserInteractionForPINOperation

WithInteractionTimeout sets the timeout, in seconds, after the first key stroke. If set to 0, the reader-defined default timeout is used. 0 by default.

func (*SmartCardUserInteractionForPINOperation) WithLocale added in v0.17.0

WithLocale sets the locale for the displayed messages. If nil, the user’s current locale is used. By default, this value is the current locale of the system.

func (*SmartCardUserInteractionForPINOperation) WithPINCompletion added in v0.17.0

WithPINCompletion sets the conditions under which PIN entry should be considered complete.

func (*SmartCardUserInteractionForPINOperation) WithPINMessageIndices added in v0.17.0

WithPINMessageIndices sets a list of message indices referring to a predefined message table, used to specify the type and number of messages displayed during the PIN operation. nil by default.

func (*SmartCardUserInteractionForPINOperation) WithResultData added in v0.17.0

WithResultData sets the returned data without SW1-SW2 bytes, if any.

func (*SmartCardUserInteractionForPINOperation) WithResultSW added in v0.17.0

WithResultSW sets the SW1-SW2 status bytes.

type SmartCardUserInteractionForPINOperationProvider added in v0.17.0

type SmartCardUserInteractionForPINOperationProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

SmartCardUserInteractionForPINOperationProvider is accepted wherever a TKSmartCardUserInteractionForPINOperation (or one of its subclasses) is expected.

type SmartCardUserInteractionForSecurePINChange added in v0.17.0

type SmartCardUserInteractionForSecurePINChange struct {
	SmartCardUserInteractionForPINOperation
}

SmartCardUserInteractionForSecurePINChange is an idiomatic wrapper over the Objective-C class TKSmartCardUserInteractionForSecurePINChange.

It embeds SmartCardUserInteractionForPINOperation, promoting that type's methods.

A representation of the user interaction for secure PIN change operations on a Smart Card reader.

func NewSmartCardUserInteractionForSecurePINChange added in v0.17.0

func NewSmartCardUserInteractionForSecurePINChange() *SmartCardUserInteractionForSecurePINChange

NewSmartCardUserInteractionForSecurePINChange creates a new SmartCardUserInteractionForSecurePINChange.

func SmartCardUserInteractionForSecurePINChangeFromID added in v0.17.0

func SmartCardUserInteractionForSecurePINChangeFromID(id objc.ID) *SmartCardUserInteractionForSecurePINChange

SmartCardUserInteractionForSecurePINChangeFromID adopts an existing Objective-C object as a SmartCardUserInteractionForSecurePINChange (nil for 0), retaining it and registering a release finalizer.

func (*SmartCardUserInteractionForSecurePINChange) PINConfirmation added in v0.17.0

PINConfirmation returns the pin confirmation.

func (*SmartCardUserInteractionForSecurePINChange) WithDelegate added in v0.17.0

WithDelegate sets the delegate for observing events that occur during the user interaction.

func (*SmartCardUserInteractionForSecurePINChange) WithInitialTimeout added in v0.17.0

WithInitialTimeout sets the timeout, in seconds, for initial interaction. If set to 0, the reader-defined default timeout is used. 0 by default.

func (*SmartCardUserInteractionForSecurePINChange) WithInteractionTimeout added in v0.17.0

func (scuifspc *SmartCardUserInteractionForSecurePINChange) WithInteractionTimeout(interactionTimeout float64) *SmartCardUserInteractionForSecurePINChange

WithInteractionTimeout sets the timeout, in seconds, after the first key stroke. If set to 0, the reader-defined default timeout is used. 0 by default.

func (*SmartCardUserInteractionForSecurePINChange) WithLocale added in v0.17.0

WithLocale sets the locale for the displayed messages. If nil, the user’s current locale is used. By default, this value is the current locale of the system.

func (*SmartCardUserInteractionForSecurePINChange) WithPINCompletion added in v0.17.0

WithPINCompletion sets the conditions under which PIN entry should be considered complete.

func (*SmartCardUserInteractionForSecurePINChange) WithPINConfirmation added in v0.17.0

WithPINConfirmation sets the way PIN confirmation is requested. TKSmartCardPINConfirmationNone by default.

func (*SmartCardUserInteractionForSecurePINChange) WithPINMessageIndices added in v0.17.0

WithPINMessageIndices sets a list of message indices referring to a predefined message table, used to specify the type and number of messages displayed during the PIN operation. nil by default.

func (*SmartCardUserInteractionForSecurePINChange) WithResultData added in v0.17.0

WithResultData sets the returned data without SW1-SW2 bytes, if any.

func (*SmartCardUserInteractionForSecurePINChange) WithResultSW added in v0.17.0

WithResultSW sets the SW1-SW2 status bytes.

type SmartCardUserInteractionForSecurePINVerification added in v0.17.0

type SmartCardUserInteractionForSecurePINVerification struct {
	SmartCardUserInteractionForPINOperation
}

SmartCardUserInteractionForSecurePINVerification is an idiomatic wrapper over the Objective-C class TKSmartCardUserInteractionForSecurePINVerification.

It embeds SmartCardUserInteractionForPINOperation, promoting that type's methods.

A representation of the user interaction for secure PIN change verification on a Smart Card reader.

func NewSmartCardUserInteractionForSecurePINVerification added in v0.17.0

func NewSmartCardUserInteractionForSecurePINVerification() *SmartCardUserInteractionForSecurePINVerification

NewSmartCardUserInteractionForSecurePINVerification creates a new SmartCardUserInteractionForSecurePINVerification.

func SmartCardUserInteractionForSecurePINVerificationFromID added in v0.17.0

func SmartCardUserInteractionForSecurePINVerificationFromID(id objc.ID) *SmartCardUserInteractionForSecurePINVerification

SmartCardUserInteractionForSecurePINVerificationFromID adopts an existing Objective-C object as a SmartCardUserInteractionForSecurePINVerification (nil for 0), retaining it and registering a release finalizer.

func (*SmartCardUserInteractionForSecurePINVerification) WithDelegate added in v0.17.0

WithDelegate sets the delegate for observing events that occur during the user interaction.

func (*SmartCardUserInteractionForSecurePINVerification) WithInitialTimeout added in v0.17.0

WithInitialTimeout sets the timeout, in seconds, for initial interaction. If set to 0, the reader-defined default timeout is used. 0 by default.

func (*SmartCardUserInteractionForSecurePINVerification) WithInteractionTimeout added in v0.17.0

WithInteractionTimeout sets the timeout, in seconds, after the first key stroke. If set to 0, the reader-defined default timeout is used. 0 by default.

func (*SmartCardUserInteractionForSecurePINVerification) WithLocale added in v0.17.0

WithLocale sets the locale for the displayed messages. If nil, the user’s current locale is used. By default, this value is the current locale of the system.

func (*SmartCardUserInteractionForSecurePINVerification) WithPINCompletion added in v0.17.0

WithPINCompletion sets the conditions under which PIN entry should be considered complete.

func (*SmartCardUserInteractionForSecurePINVerification) WithPINMessageIndices added in v0.17.0

WithPINMessageIndices sets a list of message indices referring to a predefined message table, used to specify the type and number of messages displayed during the PIN operation. nil by default.

func (*SmartCardUserInteractionForSecurePINVerification) WithResultData added in v0.17.0

WithResultData sets the returned data without SW1-SW2 bytes, if any.

func (*SmartCardUserInteractionForSecurePINVerification) WithResultSW added in v0.17.0

WithResultSW sets the SW1-SW2 status bytes.

type SmartCardUserInteractionProvider added in v0.17.0

type SmartCardUserInteractionProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

SmartCardUserInteractionProvider is accepted wherever a TKSmartCardUserInteraction (or one of its subclasses) is expected.

type TLVRecord added in v0.17.0

type TLVRecord struct {
	objref.Handle
}

TLVRecord is an idiomatic wrapper over the Objective-C class TKTLVRecord.

TLVRecord is an abstract base — you do not construct it directly. Construct one of BERTLVRecord, CompactTLVRecord, SimpleTLVRecord and pass it where a TLVRecord is accepted.

The base class encapsulating a Tag-Length-Value record.

func RecordFromData added in v0.17.0

func RecordFromData(data []byte) *TLVRecord

RecordFromData creates and returns a TLV record from by parsing the specified data.

func SequenceOfRecordsFromData added in v0.17.0

func SequenceOfRecordsFromData(data []byte) []*TLVRecord

SequenceOfRecordsFromData creates and returns an array of TLV records from the specified data.

func TLVRecordFromID added in v0.17.0

func TLVRecordFromID(id objc.ID) *TLVRecord

TLVRecordFromID adopts an existing Objective-C object as a TLVRecord (nil for 0), retaining it and registering a release finalizer.

func (*TLVRecord) Data added in v0.17.0

func (tr *TLVRecord) Data() []byte

Data returns data object containing whole encoded record, including tag, length and value.

func (*TLVRecord) Description added in v0.17.0

func (tr *TLVRecord) Description() string

Description returns the object's -description text.

func (*TLVRecord) IsEqual added in v0.17.0

func (tr *TLVRecord) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*TLVRecord) IsKind added in v0.17.0

func (tr *TLVRecord) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*TLVRecord) String added in v0.17.0

func (tr *TLVRecord) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*TLVRecord) Tag added in v0.17.0

func (tr *TLVRecord) Tag() uint64

Tag returns tag value of the record.

func (*TLVRecord) Value added in v0.17.0

func (tr *TLVRecord) Value() []byte

Value returns value field of the record.

type TLVRecordProvider added in v0.17.0

type TLVRecordProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

TLVRecordProvider is accepted wherever a TKTLVRecord (or one of its subclasses) is expected.

type Tag added in v0.17.0

type Tag int32
const (
	TagUndefinedTag  Tag = 0
	TagExtendedAllow Tag = 1
	TagExtendedDeny  Tag = 2
)

func (Tag) String added in v0.17.0

func (e Tag) String() string

String returns the Tag constant's name, or its numeric form when the value is not a known constant.

type Token added in v0.17.0

type Token struct {
	objref.Handle
}

Token is an idiomatic wrapper over the Objective-C class TKToken.

Token is an abstract base — you do not construct it directly. Construct one of SmartCardToken and pass it where a Token is accepted.

A representation of a hardware-based cryptographic token.

func NewTokenWithTokenDriverInstanceID added in v0.17.0

func NewTokenWithTokenDriverInstanceID(tokenDriver *TokenDriver, instanceID obj.Object) *Token

NewTokenWithTokenDriverInstanceID initializes a token with the driver you specify.

func TokenFromID added in v0.17.0

func TokenFromID(id objc.ID) *Token

TokenFromID adopts an existing Objective-C object as a Token (nil for 0), retaining it and registering a release finalizer.

func (*Token) Configuration added in v0.17.0

func (t *Token) Configuration() *TokenConfiguration

Configuration returns token configuration associated with this token instance.

func (*Token) Description added in v0.17.0

func (t *Token) Description() string

Description returns the object's -description text.

func (*Token) IsEqual added in v0.17.0

func (t *Token) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*Token) IsKind added in v0.17.0

func (t *Token) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*Token) KeychainContents added in v0.17.0

func (t *Token) KeychainContents() *TokenKeychainContents

KeychainContents returns keychain contents (certificate and key items) representing this token.

func (*Token) String added in v0.17.0

func (t *Token) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*Token) TokenDriver added in v0.17.0

func (t *Token) TokenDriver() *TokenDriver

TokenDriver returns the token driver.

type TokenAuthOperation added in v0.17.0

type TokenAuthOperation struct {
	objref.Handle
}

TokenAuthOperation is an idiomatic wrapper over the Objective-C class TKTokenAuthOperation.

TokenAuthOperation is an abstract base — you do not construct it directly. Construct one of TokenPasswordAuthOperation, TokenSmartCardPINAuthOperation and pass it where a TokenAuthOperation is accepted.

An authentication operation for a cryptographic token.

func TokenAuthOperationFromID added in v0.17.0

func TokenAuthOperationFromID(id objc.ID) *TokenAuthOperation

TokenAuthOperationFromID adopts an existing Objective-C object as a TokenAuthOperation (nil for 0), retaining it and registering a release finalizer.

func (*TokenAuthOperation) Description added in v0.17.0

func (tao *TokenAuthOperation) Description() string

Description returns the object's -description text.

func (*TokenAuthOperation) Finish added in v0.17.0

func (tao *TokenAuthOperation) Finish() error

Finish finishes the authentication operation.

Finish returns an error if the operation did not succeed.

func (*TokenAuthOperation) IsEqual added in v0.17.0

func (tao *TokenAuthOperation) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*TokenAuthOperation) IsKind added in v0.17.0

func (tao *TokenAuthOperation) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*TokenAuthOperation) String added in v0.17.0

func (tao *TokenAuthOperation) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type TokenAuthOperationProvider added in v0.17.0

type TokenAuthOperationProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

TokenAuthOperationProvider is accepted wherever a TKTokenAuthOperation (or one of its subclasses) is expected.

type TokenConfiguration added in v0.17.0

type TokenConfiguration struct {
	objref.Handle
}

TokenConfiguration is an idiomatic wrapper over the Objective-C class TKTokenConfiguration.

A token’s configuration.

func NewTokenConfiguration added in v0.17.0

func NewTokenConfiguration() *TokenConfiguration

NewTokenConfiguration creates a new TokenConfiguration.

func TokenConfigurationFromID added in v0.17.0

func TokenConfigurationFromID(id objc.ID) *TokenConfiguration

TokenConfigurationFromID adopts an existing Objective-C object as a TokenConfiguration (nil for 0), retaining it and registering a release finalizer.

func (*TokenConfiguration) CertificateForObjectID added in v0.17.0

func (tc *TokenConfiguration) CertificateForObjectID(objectID obj.Object) (result *TokenKeychainCertificate, err error)

CertificateForObjectID returns certificate with specified objectID. Fills error with TKTokenErrorCodeObjectNotFound if no such certificate exists.

func (*TokenConfiguration) ConfigurationData added in v0.17.0

func (tc *TokenConfiguration) ConfigurationData() []byte

ConfigurationData returns additional configuration available for token instance. Token implementation and its hosting application can use this data for specifying any additional configuration for the token. System does not interpret this data in any way. For example, network-based HSM can store here (using Codable or other serialization mechanisms) target network address, access credentials and the list of identities accessible in the HSM.

func (*TokenConfiguration) Description added in v0.17.0

func (tc *TokenConfiguration) Description() string

Description returns the object's -description text.

func (*TokenConfiguration) InstanceID added in v0.17.0

func (tc *TokenConfiguration) InstanceID() *foundation.String

InstanceID returns unique, persistent identifier of this token, always created by specific token implementation. Typically implemented by some kind of serial number of the target hardware, for example SmartCard serial number.

func (*TokenConfiguration) IsEqual added in v0.17.0

func (tc *TokenConfiguration) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*TokenConfiguration) IsKind added in v0.17.0

func (tc *TokenConfiguration) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*TokenConfiguration) KeyForObjectID added in v0.17.0

func (tc *TokenConfiguration) KeyForObjectID(objectID obj.Object) (result *TokenKeychainKey, err error)

KeyForObjectID returns keychain item key with specified objectID. Fills error with TKTokenErrorCodeObjectNotFound if no such key exists.

func (*TokenConfiguration) KeychainItems added in v0.17.0

func (tc *TokenConfiguration) KeychainItems() []*TokenKeychainItem

KeychainItems returns all keychain items of this token.

KeychainItems returns the collection as a Go slice.

func (*TokenConfiguration) String added in v0.17.0

func (tc *TokenConfiguration) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*TokenConfiguration) WithConfigurationData added in v0.17.0

func (tc *TokenConfiguration) WithConfigurationData(configurationData []byte) *TokenConfiguration

WithConfigurationData sets additional configuration available for token instance. Token implementation and its hosting application can use this data for specifying any additional configuration for the token. System does not interpret this data in any way. For example, network-based HSM can store here (using Codable or other serialization mechanisms) target network address, access credentials and the list of identities accessible in the HSM.

func (*TokenConfiguration) WithKeychainItems added in v0.17.0

func (tc *TokenConfiguration) WithKeychainItems(items ...TokenKeychainItemProvider) *TokenConfiguration

WithKeychainItems sets all keychain items of this token.

type TokenDelegate added in v0.17.0

type TokenDelegate interface {
	TokenCreateSessionWithError(token *Token) *TokenSession
}

TokenDelegate is the Go form of the Objective-C protocol TKTokenDelegate.

type TokenDriver added in v0.17.0

type TokenDriver struct {
	objref.Handle
}

TokenDriver is an idiomatic wrapper over the Objective-C class TKTokenDriver.

TokenDriver is an abstract base — you do not construct it directly. Construct one of SmartCardTokenDriver and pass it where a TokenDriver is accepted.

A base class for building token drivers.

func TokenDriverFromID added in v0.17.0

func TokenDriverFromID(id objc.ID) *TokenDriver

TokenDriverFromID adopts an existing Objective-C object as a TokenDriver (nil for 0), retaining it and registering a release finalizer.

func (*TokenDriver) Description added in v0.17.0

func (td *TokenDriver) Description() string

Description returns the object's -description text.

func (*TokenDriver) IsEqual added in v0.17.0

func (td *TokenDriver) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*TokenDriver) IsKind added in v0.17.0

func (td *TokenDriver) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*TokenDriver) String added in v0.17.0

func (td *TokenDriver) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*TokenDriver) WithDelegate added in v0.17.0

func (td *TokenDriver) WithDelegate(delegate TokenDriverDelegate) *TokenDriver

WithDelegate sets the token driver delegate.

type TokenDriverConfiguration added in v0.17.0

type TokenDriverConfiguration struct {
	objref.Handle
}

TokenDriverConfiguration is an idiomatic wrapper over the Objective-C class TKTokenDriverConfiguration.

A configuration for one class of token.

func NewTokenDriverConfiguration added in v0.17.0

func NewTokenDriverConfiguration() *TokenDriverConfiguration

NewTokenDriverConfiguration creates a new TokenDriverConfiguration.

func TokenDriverConfigurationFromID added in v0.17.0

func TokenDriverConfigurationFromID(id objc.ID) *TokenDriverConfiguration

TokenDriverConfigurationFromID adopts an existing Objective-C object as a TokenDriverConfiguration (nil for 0), retaining it and registering a release finalizer.

func (*TokenDriverConfiguration) AddTokenConfigurationForTokenInstanceID added in v0.17.0

func (tdc *TokenDriverConfiguration) AddTokenConfigurationForTokenInstanceID(instanceID obj.Object) *TokenConfiguration

AddTokenConfigurationForTokenInstanceID creates new configuration object for token with specified instanceID and adds it into tokenConfigurations dictionary. If configuration with specified instanceID already exists, it is replaced with new empty configuration.

func (*TokenDriverConfiguration) ClassID added in v0.17.0

func (tdc *TokenDriverConfiguration) ClassID() *foundation.String

ClassID returns classID of the token configuration. ClassID is taken from

func (*TokenDriverConfiguration) Description added in v0.17.0

func (tdc *TokenDriverConfiguration) Description() string

Description returns the object's -description text.

func (*TokenDriverConfiguration) IsEqual added in v0.17.0

func (tdc *TokenDriverConfiguration) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*TokenDriverConfiguration) IsKind added in v0.17.0

func (tdc *TokenDriverConfiguration) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*TokenDriverConfiguration) RemoveTokenConfigurationForTokenInstanceID added in v0.17.0

func (tdc *TokenDriverConfiguration) RemoveTokenConfigurationForTokenInstanceID(instanceID obj.Object)

RemoveTokenConfigurationForTokenInstanceID removes configuration with specified tokenID. Does nothing if no such token configuration exists.

func (*TokenDriverConfiguration) String added in v0.17.0

func (tdc *TokenDriverConfiguration) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*TokenDriverConfiguration) TokenConfigurations added in v0.17.0

func (tdc *TokenDriverConfiguration) TokenConfigurations() obj.Object

TokenConfigurations returns dictionary of all currently configured tokens for this token class, keyed by instanceID.

type TokenDriverDelegate added in v0.17.0

type TokenDriverDelegate interface {
}

TokenDriverDelegate receives the callbacks of the Objective-C protocol TKTokenDriverDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (TokenDriverDelegate…Handler): implement the ones you need on the same value and the framework will call them too.

type TokenDriverDelegateTokenDriverTerminateTokenHandler added in v0.17.0

type TokenDriverDelegateTokenDriverTerminateTokenHandler interface {
	TokenDriverTerminateToken(driver *TokenDriver, token *Token)
}

TokenDriverDelegateTokenDriverTerminateTokenHandler is the optional TKTokenDriverDelegate method tokenDriver:terminateToken:. Implement it on a TokenDriverDelegate value to receive that callback; a value without it is simply never sent one.

type TokenDriverProvider added in v0.17.0

type TokenDriverProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

TokenDriverProvider is accepted wherever a TKTokenDriver (or one of its subclasses) is expected.

type TokenKeyAlgorithm added in v0.17.0

type TokenKeyAlgorithm struct {
	objref.Handle
}

TokenKeyAlgorithm is an idiomatic wrapper over the Objective-C class TKTokenKeyAlgorithm.

Cryptographic algorithms used by token keys.

func NewTokenKeyAlgorithm added in v0.17.0

func NewTokenKeyAlgorithm() *TokenKeyAlgorithm

NewTokenKeyAlgorithm creates a new TokenKeyAlgorithm.

func TokenKeyAlgorithmFromID added in v0.17.0

func TokenKeyAlgorithmFromID(id objc.ID) *TokenKeyAlgorithm

TokenKeyAlgorithmFromID adopts an existing Objective-C object as a TokenKeyAlgorithm (nil for 0), retaining it and registering a release finalizer.

func (*TokenKeyAlgorithm) Description added in v0.17.0

func (tka *TokenKeyAlgorithm) Description() string

Description returns the object's -description text.

func (*TokenKeyAlgorithm) IsAlgorithm added in v0.17.0

func (tka *TokenKeyAlgorithm) IsAlgorithm(algorithm unsafe.Pointer) bool

IsAlgorithm returns whether the specified algorithm is the target operation algorithm.

func (*TokenKeyAlgorithm) IsEqual added in v0.17.0

func (tka *TokenKeyAlgorithm) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*TokenKeyAlgorithm) IsKind added in v0.17.0

func (tka *TokenKeyAlgorithm) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*TokenKeyAlgorithm) String added in v0.17.0

func (tka *TokenKeyAlgorithm) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*TokenKeyAlgorithm) SupportsAlgorithm added in v0.17.0

func (tka *TokenKeyAlgorithm) SupportsAlgorithm(algorithm unsafe.Pointer) bool

SupportsAlgorithm whether the specified algorithm is the target operation algorithm, or one of the other algorithms used.

type TokenKeyExchangeParameters added in v0.17.0

type TokenKeyExchangeParameters struct {
	objref.Handle
}

TokenKeyExchangeParameters is an idiomatic wrapper over the Objective-C class TKTokenKeyExchangeParameters.

Parameters used to perform specific key exchange operations.

func NewTokenKeyExchangeParameters added in v0.17.0

func NewTokenKeyExchangeParameters() *TokenKeyExchangeParameters

NewTokenKeyExchangeParameters creates a new TokenKeyExchangeParameters.

func TokenKeyExchangeParametersFromID added in v0.17.0

func TokenKeyExchangeParametersFromID(id objc.ID) *TokenKeyExchangeParameters

TokenKeyExchangeParametersFromID adopts an existing Objective-C object as a TokenKeyExchangeParameters (nil for 0), retaining it and registering a release finalizer.

func (*TokenKeyExchangeParameters) Description added in v0.17.0

func (tkep *TokenKeyExchangeParameters) Description() string

Description returns the object's -description text.

func (*TokenKeyExchangeParameters) IsEqual added in v0.17.0

func (tkep *TokenKeyExchangeParameters) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*TokenKeyExchangeParameters) IsKind added in v0.17.0

func (tkep *TokenKeyExchangeParameters) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*TokenKeyExchangeParameters) RequestedSize added in v0.17.0

func (tkep *TokenKeyExchangeParameters) RequestedSize() int

RequestedSize returns requested output size of key exchange result. Should be ignored if output size is not configurable for specified key exchange algorithm.

func (*TokenKeyExchangeParameters) SharedInfo added in v0.17.0

func (tkep *TokenKeyExchangeParameters) SharedInfo() []byte

SharedInfo returns additional shared information input, typically used for key derivation (KDF) step of key exchange algorithm. Should be ignored if shared info is not used for specified key exchange algorithm.

func (*TokenKeyExchangeParameters) String added in v0.17.0

func (tkep *TokenKeyExchangeParameters) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type TokenKeychainCertificate added in v0.17.0

type TokenKeychainCertificate struct {
	TokenKeychainItem
}

TokenKeychainCertificate is an idiomatic wrapper over the Objective-C class TKTokenKeychainCertificate.

It embeds TokenKeychainItem, promoting that type's methods.

A token’s certificate as stored in the keychain.

func NewTokenKeychainCertificateWithCertificateObjectID added in v0.17.0

func NewTokenKeychainCertificateWithCertificateObjectID(certificateRef obj.Object, objectID obj.Object) *TokenKeychainCertificate

NewTokenKeychainCertificateWithCertificateObjectID initializes a token keychain certificate with data from the specified certificate reference and a given object ID.

func TokenKeychainCertificateFromID added in v0.17.0

func TokenKeychainCertificateFromID(id objc.ID) *TokenKeychainCertificate

TokenKeychainCertificateFromID adopts an existing Objective-C object as a TokenKeychainCertificate (nil for 0), retaining it and registering a release finalizer.

func (*TokenKeychainCertificate) Data added in v0.17.0

func (tkc *TokenKeychainCertificate) Data() []byte

Data returns the data.

func (*TokenKeychainCertificate) WithConstraints added in v0.17.0

func (tkc *TokenKeychainCertificate) WithConstraints(constraints obj.Object) *TokenKeychainCertificate

WithConstraints sets access constraints for the keychain item, keyed by TKTokenOperation values wrapped in NSNumber objects.

func (*TokenKeychainCertificate) WithLabel added in v0.17.0

WithLabel sets the user-visible label for the keychain item.

type TokenKeychainContents added in v0.17.0

type TokenKeychainContents struct {
	objref.Handle
}

TokenKeychainContents is an idiomatic wrapper over the Objective-C class TKTokenKeychainContents.

A representation of the state of the keychain for a particular token.

func NewTokenKeychainContents added in v0.17.0

func NewTokenKeychainContents() *TokenKeychainContents

NewTokenKeychainContents creates a new TokenKeychainContents.

func TokenKeychainContentsFromID added in v0.17.0

func TokenKeychainContentsFromID(id objc.ID) *TokenKeychainContents

TokenKeychainContentsFromID adopts an existing Objective-C object as a TokenKeychainContents (nil for 0), retaining it and registering a release finalizer.

func (*TokenKeychainContents) CertificateForObjectID added in v0.17.0

func (tkc *TokenKeychainContents) CertificateForObjectID(objectID obj.Object) (result *TokenKeychainCertificate, err error)

CertificateForObjectID returns the key for a specified object identifier.

func (*TokenKeychainContents) Description added in v0.17.0

func (tkc *TokenKeychainContents) Description() string

Description returns the object's -description text.

func (*TokenKeychainContents) FillWithItems added in v0.17.0

func (tkc *TokenKeychainContents) FillWithItems(items []*TokenKeychainItem)

FillWithItems fills the keychain with the specified items.

func (*TokenKeychainContents) IsEqual added in v0.17.0

func (tkc *TokenKeychainContents) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*TokenKeychainContents) IsKind added in v0.17.0

func (tkc *TokenKeychainContents) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*TokenKeychainContents) Items added in v0.17.0

func (tkc *TokenKeychainContents) Items() []*TokenKeychainItem

Items returns all items related to this token in the keychain.

Items returns the collection as a Go slice.

func (*TokenKeychainContents) KeyForObjectID added in v0.17.0

func (tkc *TokenKeychainContents) KeyForObjectID(objectID obj.Object) (result *TokenKeychainKey, err error)

KeyForObjectID returns the key for a specified object identifier.

func (*TokenKeychainContents) String added in v0.17.0

func (tkc *TokenKeychainContents) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type TokenKeychainItem added in v0.17.0

type TokenKeychainItem struct {
	objref.Handle
}

TokenKeychainItem is an idiomatic wrapper over the Objective-C class TKTokenKeychainItem.

TokenKeychainItem is an abstract base — you do not construct it directly. Construct one of TokenKeychainCertificate, TokenKeychainKey and pass it where a TokenKeychainItem is accepted.

An abstract base class for managing a token’s contents as keychain items.

func NewTokenKeychainItemWithObjectID added in v0.17.0

func NewTokenKeychainItemWithObjectID(objectID obj.Object) *TokenKeychainItem

NewTokenKeychainItemWithObjectID initializes a token keychain item with the specified object ID.

func TokenKeychainItemFromID added in v0.17.0

func TokenKeychainItemFromID(id objc.ID) *TokenKeychainItem

TokenKeychainItemFromID adopts an existing Objective-C object as a TokenKeychainItem (nil for 0), retaining it and registering a release finalizer.

func (*TokenKeychainItem) Constraints added in v0.17.0

func (tki *TokenKeychainItem) Constraints() obj.Object

Constraints contains access constraints for this object keyed by TKTOpenOperation wrapped in NSNumber.

func (*TokenKeychainItem) Description added in v0.17.0

func (tki *TokenKeychainItem) Description() string

Description returns the object's -description text.

func (*TokenKeychainItem) IsEqual added in v0.17.0

func (tki *TokenKeychainItem) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*TokenKeychainItem) IsKind added in v0.17.0

func (tki *TokenKeychainItem) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*TokenKeychainItem) Label added in v0.17.0

func (tki *TokenKeychainItem) Label() string

Label contains the user-visible label for this item. This property is an equivalent of kSecAttrLabel in SecItem.h

func (*TokenKeychainItem) ObjectID added in v0.17.0

func (tki *TokenKeychainItem) ObjectID() obj.Object

ObjectID returns object ID for item identification

func (*TokenKeychainItem) String added in v0.17.0

func (tki *TokenKeychainItem) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*TokenKeychainItem) WithConstraints added in v0.17.0

func (tki *TokenKeychainItem) WithConstraints(constraints obj.Object) *TokenKeychainItem

WithConstraints sets access constraints for the keychain item, keyed by TKTokenOperation values wrapped in NSNumber objects.

func (*TokenKeychainItem) WithLabel added in v0.17.0

func (tki *TokenKeychainItem) WithLabel(label string) *TokenKeychainItem

WithLabel sets the user-visible label for the keychain item.

type TokenKeychainItemProvider added in v0.17.0

type TokenKeychainItemProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

TokenKeychainItemProvider is accepted wherever a TKTokenKeychainItem (or one of its subclasses) is expected.

type TokenKeychainKey added in v0.17.0

type TokenKeychainKey struct {
	TokenKeychainItem
}

TokenKeychainKey is an idiomatic wrapper over the Objective-C class TKTokenKeychainKey.

It embeds TokenKeychainItem, promoting that type's methods.

A token’s key as stored in the keychain.

func NewTokenKeychainKeyWithCertificateObjectID added in v0.17.0

func NewTokenKeychainKeyWithCertificateObjectID(certificateRef obj.Object, objectID obj.Object) *TokenKeychainKey

NewTokenKeychainKeyWithCertificateObjectID initializes a token keychain key with data from the specified certificate reference and a given object ID.

func TokenKeychainKeyFromID added in v0.17.0

func TokenKeychainKeyFromID(id objc.ID) *TokenKeychainKey

TokenKeychainKeyFromID adopts an existing Objective-C object as a TokenKeychainKey (nil for 0), retaining it and registering a release finalizer.

func (*TokenKeychainKey) ApplicationTag added in v0.17.0

func (tkk *TokenKeychainKey) ApplicationTag() []byte

ApplicationTag represents private tag data. The property is an equivalent to kSecAttrApplicationTag in SecItem.h

func (*TokenKeychainKey) CanDecrypt added in v0.17.0

func (tkk *TokenKeychainKey) CanDecrypt() bool

CanDecrypt reports whether this key can be used to decrypt data. The property is an equivalent to kSecAttrCanDecrypt in SecItem.h

func (*TokenKeychainKey) CanPerformKeyExchange added in v0.17.0

func (tkk *TokenKeychainKey) CanPerformKeyExchange() bool

CanPerformKeyExchange reports whether this key can be used to perform Diffie-Hellman style cryptographic key exchange.

func (*TokenKeychainKey) CanSign added in v0.17.0

func (tkk *TokenKeychainKey) CanSign() bool

CanSign reports whether this key can be used to create a digital signature. The property is an equivalent to kSecAttrCanSign in SecItem.h

func (*TokenKeychainKey) IsSuitableForLogin added in v0.17.0

func (tkk *TokenKeychainKey) IsSuitableForLogin() bool

IsSuitableForLogin reports whether this key can be used for login in to the system.

func (*TokenKeychainKey) KeySizeInBits added in v0.17.0

func (tkk *TokenKeychainKey) KeySizeInBits() int

KeySizeInBits indicates the number of bits in this key. The property is an equivalent to kSecAttrKeySizeInBits in SecItem.h

func (*TokenKeychainKey) KeyType added in v0.17.0

func (tkk *TokenKeychainKey) KeyType() string

KeyType returns type of the key, currently kSecAttrKeyTypeRSA and kSecAttrKeyTypeECSECPrimeRandom is supported). The property is an equivalent to kSecAttrKeyType in SecItem.h

func (*TokenKeychainKey) PublicKeyData added in v0.17.0

func (tkk *TokenKeychainKey) PublicKeyData() []byte

PublicKeyData contains raw public key data for this private key.

func (*TokenKeychainKey) PublicKeyHash added in v0.17.0

func (tkk *TokenKeychainKey) PublicKeyHash() []byte

PublicKeyHash returns SHA1 hash of the raw public key. The property is an equivalent to kSecAttrApplicationLabel in SecItem.h

func (*TokenKeychainKey) WithApplicationTag added in v0.17.0

func (tkk *TokenKeychainKey) WithApplicationTag(applicationTag []byte) *TokenKeychainKey

WithApplicationTag sets the private tag data.

func (*TokenKeychainKey) WithCanDecrypt added in v0.17.0

func (tkk *TokenKeychainKey) WithCanDecrypt(canDecrypt bool) *TokenKeychainKey

WithCanDecrypt sets whether the key can be used to decrypt data.

func (*TokenKeychainKey) WithCanPerformKeyExchange added in v0.17.0

func (tkk *TokenKeychainKey) WithCanPerformKeyExchange(canPerformKeyExchange bool) *TokenKeychainKey

WithCanPerformKeyExchange sets whether the key can be used to perform Diffie-Hellman style cryptographic key exchange.

func (*TokenKeychainKey) WithCanSign added in v0.17.0

func (tkk *TokenKeychainKey) WithCanSign(canSign bool) *TokenKeychainKey

WithCanSign sets whether the key can be used to sign data.

func (*TokenKeychainKey) WithConstraints added in v0.17.0

func (tkk *TokenKeychainKey) WithConstraints(constraints obj.Object) *TokenKeychainKey

WithConstraints sets access constraints for the keychain item, keyed by TKTokenOperation values wrapped in NSNumber objects.

func (*TokenKeychainKey) WithKeySizeInBits added in v0.17.0

func (tkk *TokenKeychainKey) WithKeySizeInBits(keySizeInBits int) *TokenKeychainKey

WithKeySizeInBits sets indicates the number of bits in this key. The property is an equivalent to kSecAttrKeySizeInBits in SecItem.h

func (*TokenKeychainKey) WithKeyType added in v0.17.0

func (tkk *TokenKeychainKey) WithKeyType(keyType string) *TokenKeychainKey

WithKeyType sets the type of the key. Currently, only kSecAttrKeyTypeRSA and kSecAttrKeyTypeECSECPrimeRandom are supported values.

func (*TokenKeychainKey) WithLabel added in v0.17.0

func (tkk *TokenKeychainKey) WithLabel(label string) *TokenKeychainKey

WithLabel sets the user-visible label for the keychain item.

func (*TokenKeychainKey) WithPublicKeyData added in v0.17.0

func (tkk *TokenKeychainKey) WithPublicKeyData(publicKeyData []byte) *TokenKeychainKey

WithPublicKeyData sets the public key data.

func (*TokenKeychainKey) WithPublicKeyHash added in v0.17.0

func (tkk *TokenKeychainKey) WithPublicKeyHash(publicKeyHash []byte) *TokenKeychainKey

WithPublicKeyHash sets the SHA1 hash of the raw public key.

func (*TokenKeychainKey) WithSuitableForLogin added in v0.17.0

func (tkk *TokenKeychainKey) WithSuitableForLogin(suitableForLogin bool) *TokenKeychainKey

WithSuitableForLogin sets whether the key can be used for system login.

type TokenOperation added in v0.17.0

type TokenOperation int64

Operations that can be performed with a token’s keys and certificates.

const (
	TokenOperationNone TokenOperation = 0
	// Reading of raw data of certificate.
	TokenOperationReadData TokenOperation = 1
	// Cryptographic signature using private key.
	TokenOperationSignData TokenOperation = 2
	// Decrypting data using private key.
	TokenOperationDecryptData TokenOperation = 3
	// Performing Diffie-Hellman style of cryptographic key exchange using private key.
	TokenOperationPerformKeyExchange TokenOperation = 4
)

func (TokenOperation) String added in v0.17.0

func (e TokenOperation) String() string

String returns the TokenOperation constant's name, or its numeric form when the value is not a known constant.

type TokenPasswordAuthOperation added in v0.17.0

type TokenPasswordAuthOperation struct {
	TokenAuthOperation
}

TokenPasswordAuthOperation is an idiomatic wrapper over the Objective-C class TKTokenPasswordAuthOperation.

It embeds TokenAuthOperation, promoting that type's methods.

A password-based authentication operation.

func NewTokenPasswordAuthOperation added in v0.17.0

func NewTokenPasswordAuthOperation() *TokenPasswordAuthOperation

NewTokenPasswordAuthOperation creates a new TokenPasswordAuthOperation.

func TokenPasswordAuthOperationFromID added in v0.17.0

func TokenPasswordAuthOperationFromID(id objc.ID) *TokenPasswordAuthOperation

TokenPasswordAuthOperationFromID adopts an existing Objective-C object as a TokenPasswordAuthOperation (nil for 0), retaining it and registering a release finalizer.

func (*TokenPasswordAuthOperation) Password added in v0.17.0

func (tpao *TokenPasswordAuthOperation) Password() string

Password returns the password.

func (*TokenPasswordAuthOperation) WithPassword added in v0.17.0

func (tpao *TokenPasswordAuthOperation) WithPassword(password string) *TokenPasswordAuthOperation

WithPassword sets the password to be filled in when the finishWithError: is called.

type TokenProvider added in v0.17.0

type TokenProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

TokenProvider is accepted wherever a TKToken (or one of its subclasses) is expected.

type TokenSession added in v0.17.0

type TokenSession struct {
	objref.Handle
}

TokenSession is an idiomatic wrapper over the Objective-C class TKTokenSession.

TokenSession is an abstract base — you do not construct it directly. Construct one of SmartCardTokenSession and pass it where a TokenSession is accepted.

A token session that manages the authentication state of a token.

func NewTokenSessionWithToken added in v0.17.0

func NewTokenSessionWithToken(token *Token) *TokenSession

NewTokenSessionWithToken initializes a token session with the specified token.

func TokenSessionFromID added in v0.17.0

func TokenSessionFromID(id objc.ID) *TokenSession

TokenSessionFromID adopts an existing Objective-C object as a TokenSession (nil for 0), retaining it and registering a release finalizer.

func (*TokenSession) Description added in v0.17.0

func (ts *TokenSession) Description() string

Description returns the object's -description text.

func (*TokenSession) IsEqual added in v0.17.0

func (ts *TokenSession) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*TokenSession) IsKind added in v0.17.0

func (ts *TokenSession) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*TokenSession) String added in v0.17.0

func (ts *TokenSession) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*TokenSession) Token added in v0.17.0

func (ts *TokenSession) Token() *Token

Token returns the token.

func (*TokenSession) WithDelegate added in v0.17.0

func (ts *TokenSession) WithDelegate(delegate TokenSessionDelegate) *TokenSession

WithDelegate sets the token session delegate.

type TokenSessionDelegate added in v0.17.0

type TokenSessionDelegate interface {
}

TokenSessionDelegate receives the callbacks of the Objective-C protocol TKTokenSessionDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (TokenSessionDelegate…Handler): implement the ones you need on the same value and the framework will call them too.

type TokenSessionDelegateTokenSessionSupportsOperationUsingKeyAlgorithmHandler added in v0.17.0

type TokenSessionDelegateTokenSessionSupportsOperationUsingKeyAlgorithmHandler interface {
	TokenSessionSupportsOperationUsingKeyAlgorithm(session *TokenSession, operation TokenOperation, keyObjectID obj.Object, algorithm *TokenKeyAlgorithm) bool
}

TokenSessionDelegateTokenSessionSupportsOperationUsingKeyAlgorithmHandler is the optional TKTokenSessionDelegate method tokenSession:supportsOperation:usingKey:algorithm:. Implement it on a TokenSessionDelegate value to receive that callback; a value without it is simply never sent one.

type TokenSessionProvider added in v0.17.0

type TokenSessionProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

TokenSessionProvider is accepted wherever a TKTokenSession (or one of its subclasses) is expected.

type TokenSmartCardPINAuthOperation added in v0.17.0

type TokenSmartCardPINAuthOperation struct {
	TokenAuthOperation
}

TokenSmartCardPINAuthOperation is an idiomatic wrapper over the Objective-C class TKTokenSmartCardPINAuthOperation.

It embeds TokenAuthOperation, promoting that type's methods.

A Smart Card PIN authentication operation.

func NewTokenSmartCardPINAuthOperation added in v0.17.0

func NewTokenSmartCardPINAuthOperation() *TokenSmartCardPINAuthOperation

NewTokenSmartCardPINAuthOperation creates a new TokenSmartCardPINAuthOperation.

func TokenSmartCardPINAuthOperationFromID added in v0.17.0

func TokenSmartCardPINAuthOperationFromID(id objc.ID) *TokenSmartCardPINAuthOperation

TokenSmartCardPINAuthOperationFromID adopts an existing Objective-C object as a TokenSmartCardPINAuthOperation (nil for 0), retaining it and registering a release finalizer.

func (*TokenSmartCardPINAuthOperation) APDUTemplate added in v0.17.0

func (tscpao *TokenSmartCardPINAuthOperation) APDUTemplate() []byte

APDUTemplate returns APDU template into which PIN gets filled in. If set to nil, the system will not attempt to authenticate by sending the formatted APDU to the SmartCard, but rather the token itself is expected to perform the authentication. It is preferred to provide APDUTemplate if possible, because it allows using hardware PINPad for secure PIN entry (provided that the reader has one).

func (*TokenSmartCardPINAuthOperation) PIN added in v0.17.0

func (tscpao *TokenSmartCardPINAuthOperation) PIN() string

PIN returns PIN value which will be set when 'finishWithError:' gets triggered. Note that the PIN is not set in case that APDUTemplate was set. In this case, PIN was already sent to the card using specified template.

func (*TokenSmartCardPINAuthOperation) PINByteOffset added in v0.17.0

func (tscpao *TokenSmartCardPINAuthOperation) PINByteOffset() int

PINByteOffset returns offset in bytes within APDU template to mark the location for filling in the PIN.

func (*TokenSmartCardPINAuthOperation) PINFormat added in v0.17.0

PINFormat returns PIN formatting properties.

func (*TokenSmartCardPINAuthOperation) SmartCard added in v0.17.0

func (tscpao *TokenSmartCardPINAuthOperation) SmartCard() *SmartCard

SmartCard returns TKSmartCard to which the formatted APDU gets sent in order to authenticate (used only if 'APDUTemplate' is set).

func (*TokenSmartCardPINAuthOperation) WithAPDUTemplate added in v0.17.0

func (tscpao *TokenSmartCardPINAuthOperation) WithAPDUTemplate(apduTemplate []byte) *TokenSmartCardPINAuthOperation

WithAPDUTemplate sets the template into which the PIN is filled in. nil by default.

func (*TokenSmartCardPINAuthOperation) WithPIN added in v0.17.0

WithPIN sets the PIN value resulting from performing the operation.

func (*TokenSmartCardPINAuthOperation) WithPINByteOffset added in v0.17.0

func (tscpao *TokenSmartCardPINAuthOperation) WithPINByteOffset(pinByteOffset int) *TokenSmartCardPINAuthOperation

WithPINByteOffset sets the offset, in bytes, within the APDU template to mark the location for filling in the PIN.

func (*TokenSmartCardPINAuthOperation) WithPINFormat added in v0.17.0

WithPINFormat sets the PIN format.

func (*TokenSmartCardPINAuthOperation) WithSmartCard added in v0.17.0

func (tscpao *TokenSmartCardPINAuthOperation) WithSmartCard(smartCard *SmartCard) *TokenSmartCardPINAuthOperation

WithSmartCard sets a Smart Card to which the formatted APDU is sent in order to authenticate.

type TokenWatcher added in v0.17.0

type TokenWatcher struct {
	objref.Handle
}

TokenWatcher is an idiomatic wrapper over the Objective-C class TKTokenWatcher.

An object that tracks the tokens available in the system.

func NewTokenWatcher added in v0.17.0

func NewTokenWatcher() *TokenWatcher

NewTokenWatcher creates a new TokenWatcher.

func NewTokenWatcherWithInsertionHandler added in v0.17.0

func NewTokenWatcherWithInsertionHandler(insertionHandler func(obj.Object)) *TokenWatcher

NewTokenWatcherWithInsertionHandler initializes a token watcher with the specified insertion handler.

func TokenWatcherFromID added in v0.17.0

func TokenWatcherFromID(id objc.ID) *TokenWatcher

TokenWatcherFromID adopts an existing Objective-C object as a TokenWatcher (nil for 0), retaining it and registering a release finalizer.

func (*TokenWatcher) AddRemovalHandlerForTokenID added in v0.17.0

func (tw *TokenWatcher) AddRemovalHandlerForTokenID(removalHandler func(obj.Object), tokenID string)

AddRemovalHandlerForTokenID adds a removal handler for the specified token ID.

func (*TokenWatcher) Description added in v0.17.0

func (tw *TokenWatcher) Description() string

Description returns the object's -description text.

func (*TokenWatcher) IsEqual added in v0.17.0

func (tw *TokenWatcher) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*TokenWatcher) IsKind added in v0.17.0

func (tw *TokenWatcher) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*TokenWatcher) SetInsertionHandler added in v0.17.0

func (tw *TokenWatcher) SetInsertionHandler(ctx context.Context) (result string, err error)

SetInsertionHandler sets an insertion handler closure to be called when a new token is inserted into the system.

SetInsertionHandler blocks until the operation completes or ctx is cancelled.

func (*TokenWatcher) String added in v0.17.0

func (tw *TokenWatcher) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*TokenWatcher) TokenIDs added in v0.17.0

func (tw *TokenWatcher) TokenIDs() []string

TokenIDs returns array of currently known TokenIDs in the system. Tokens are identified by instance's names. It is possible to use KVO to be notified about token arrivals and removals.

TokenIDs returns the collection as a Go slice.

func (*TokenWatcher) TokenInfoForTokenID added in v0.17.0

func (tw *TokenWatcher) TokenInfoForTokenID(tokenID string) *TokenWatcherTokenInfo

TokenInfoForTokenID return TokenInfo for specific tokenID

type TokenWatcherTokenInfo added in v0.17.0

type TokenWatcherTokenInfo struct {
	objref.Handle
}

TokenWatcherTokenInfo is an idiomatic wrapper over the Objective-C class TKTokenWatcherTokenInfo.

func NewTokenWatcherTokenInfo added in v0.17.0

func NewTokenWatcherTokenInfo() *TokenWatcherTokenInfo

NewTokenWatcherTokenInfo creates a new TokenWatcherTokenInfo.

func TokenWatcherTokenInfoFromID added in v0.17.0

func TokenWatcherTokenInfoFromID(id objc.ID) *TokenWatcherTokenInfo

TokenWatcherTokenInfoFromID adopts an existing Objective-C object as a TokenWatcherTokenInfo (nil for 0), retaining it and registering a release finalizer.

func (*TokenWatcherTokenInfo) Description added in v0.17.0

func (twti *TokenWatcherTokenInfo) Description() string

Description returns the object's -description text.

func (*TokenWatcherTokenInfo) DriverName added in v0.17.0

func (twti *TokenWatcherTokenInfo) DriverName() string

DriverName returns localized driver name (if available)

func (*TokenWatcherTokenInfo) IsEqual added in v0.17.0

func (twti *TokenWatcherTokenInfo) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*TokenWatcherTokenInfo) IsKind added in v0.17.0

func (twti *TokenWatcherTokenInfo) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*TokenWatcherTokenInfo) SlotName added in v0.17.0

func (twti *TokenWatcherTokenInfo) SlotName() string

SlotName returns the slot name (if available)

func (*TokenWatcherTokenInfo) String added in v0.17.0

func (twti *TokenWatcherTokenInfo) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*TokenWatcherTokenInfo) TokenID added in v0.17.0

func (twti *TokenWatcherTokenInfo) TokenID() string

TokenID returns tokenID

type Type added in v0.17.0

type Type int32
const (
	TypeExtended Type = 256
	TypeAccess   Type = 0
	TypeDefault  Type = 1
	TypeAfs      Type = 2
	TypeCoda     Type = 3
	TypeNtfs     Type = 4
	TypeNwfs     Type = 5
)

func (Type) String added in v0.17.0

func (e Type) String() string

String returns the Type constant's name, or its numeric form when the value is not a known constant.

type VirtualMemoryGuardExceptionCode added in v0.17.0

type VirtualMemoryGuardExceptionCode uint32
const (
	KGUARD_EXC_DEALLOC_GAP                   VirtualMemoryGuardExceptionCode = 1
	KGUARD_EXC_RECLAIM_COPYIO_FAILURE        VirtualMemoryGuardExceptionCode = 2
	KGUARD_EXC_RECLAIM_INDEX_FAILURE         VirtualMemoryGuardExceptionCode = 4
	KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE    VirtualMemoryGuardExceptionCode = 8
	KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE    VirtualMemoryGuardExceptionCode = 9
	KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE         VirtualMemoryGuardExceptionCode = 10
	KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE         VirtualMemoryGuardExceptionCode = 11
	KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION  VirtualMemoryGuardExceptionCode = 12
	KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY    VirtualMemoryGuardExceptionCode = 13
	KGUARD_EXC_SEC_ACCESS_FAULT              VirtualMemoryGuardExceptionCode = 98
	KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT        VirtualMemoryGuardExceptionCode = 99
	KGUARD_EXC_SEC_COPY_DENIED               VirtualMemoryGuardExceptionCode = 100
	KGUARD_EXC_SEC_SHARING_DENIED            VirtualMemoryGuardExceptionCode = 101
	KGUARD_EXC_MTE_SYNC_FAULT                VirtualMemoryGuardExceptionCode = 200
	KGUARD_EXC_MTE_ASYNC_USER_FAULT          VirtualMemoryGuardExceptionCode = 201
	KGUARD_EXC_MTE_ASYNC_KERN_FAULT          VirtualMemoryGuardExceptionCode = 202
	KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 203
	KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 204
)

func (VirtualMemoryGuardExceptionCode) String added in v0.17.0

String returns the VirtualMemoryGuardExceptionCode constant's name, or its numeric form when the value is not a known constant.

type XpcListenerCreateFlags added in v0.17.0

type XpcListenerCreateFlags uint64

Bitmask — values may be combined with |.

const (
	XpcListenerCreateFlagsNone            XpcListenerCreateFlags = 0
	XpcListenerCreateFlagsInactive        XpcListenerCreateFlags = 1
	XpcListenerCreateFlagsForceMach       XpcListenerCreateFlags = 2
	XpcListenerCreateFlagsForceXpcservice XpcListenerCreateFlags = 4
)

func (XpcListenerCreateFlags) String added in v0.17.0

func (e XpcListenerCreateFlags) String() string

String returns the XpcListenerCreateFlags constant's name, or its numeric form when the value is not a known constant.

type XpcSessionCreateFlags added in v0.17.0

type XpcSessionCreateFlags uint64

Bitmask — values may be combined with |.

const (
	XpcSessionCreateFlagsNone           XpcSessionCreateFlags = 0
	XpcSessionCreateFlagsInactive       XpcSessionCreateFlags = 1
	XpcSessionCreateFlagsMachPrivileged XpcSessionCreateFlags = 2
)

func (XpcSessionCreateFlags) String added in v0.17.0

func (e XpcSessionCreateFlags) String() string

String returns the XpcSessionCreateFlags constant's name, or its numeric form when the value is not a known constant.

Source Files

Jump to

Keyboard shortcuts

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