Versions in this module Expand all Collapse all v0 v0.1.3 Nov 16, 2022 v0.1.2 Nov 11, 2022 Changes in this version + type AttributeInfo struct + type Token interface + Checksum func(keyLabel string) ([]byte, error) + DeleteAllExcept func(keyLabels []string) error + Finalise func() error + GenerateKeyPair func(label string, keyid string, algorithm string, keytype string, keysize int) error + GetPublicKey func(label string, keyid string) (publicKey *ecdsa.PublicKey, keyBytes []byte, err error) + ImportKey func(keyBytes []byte, label string) error + PrintMechanisms func() error + PrintObjects func(label *string) error + Sign func(label string, keyid string, hash []byte) (signature []byte, err error) + Verify func(label string, keyid string, hash []byte, signature []byte) (err error) + func NewToken(lib, tokenLabel, pin string) (Token, error) + type TokenCtx interface + CloseSession func(sh pkcs11.SessionHandle) error + CreateObject func(sh pkcs11.SessionHandle, temp []*pkcs11.Attribute) (pkcs11.ObjectHandle, error) + Destroy func() + DestroyObject func(sh pkcs11.SessionHandle, oh pkcs11.ObjectHandle) error + Encrypt func(sh pkcs11.SessionHandle, message []byte) ([]byte, error) + EncryptInit func(sh pkcs11.SessionHandle, m []*pkcs11.Mechanism, o pkcs11.ObjectHandle) error + Finalize func() error + FindObjects func(sh pkcs11.SessionHandle, max int) ([]pkcs11.ObjectHandle, bool, error) + FindObjectsFinal func(sh pkcs11.SessionHandle) error + FindObjectsInit func(sh pkcs11.SessionHandle, temp []*pkcs11.Attribute) error + GenerateKey func(sh pkcs11.SessionHandle, mech []*pkcs11.Mechanism, temp []*pkcs11.Attribute) (pkcs11.ObjectHandle, error) + GenerateKeyPair func(sh pkcs11.SessionHandle, mech []*pkcs11.Mechanism, ...) (pkcs11.ObjectHandle, pkcs11.ObjectHandle, error) + GetAttributeValue func(sh pkcs11.SessionHandle, o pkcs11.ObjectHandle, a []*pkcs11.Attribute) ([]*pkcs11.Attribute, error) + GetMechanismInfo func(slotID uint, m []*pkcs11.Mechanism) (pkcs11.MechanismInfo, error) + GetMechanismList func(slotID uint) ([]*pkcs11.Mechanism, error) + GetSlotList func(tokenPresent bool) ([]uint, error) + GetTokenInfo func(slotID uint) (pkcs11.TokenInfo, error) + Initialize func() error + Login func(sh pkcs11.SessionHandle, userType uint, pin string) error + OpenSession func(slotID uint, flags uint) (pkcs11.SessionHandle, error) + Sign func(sh pkcs11.SessionHandle, message []byte) ([]byte, error) + SignInit func(sh pkcs11.SessionHandle, m []*pkcs11.Mechanism, o pkcs11.ObjectHandle) error