Versions in this module Expand all Collapse all v1 v1.1.0 Apr 12, 2019 Changes in this version + func DecodeCKACLASS(b byte) string + func FindSlotByLabel(p *pkcs11.Ctx, slotLabel string) (slot uint, index int, err error) + func GetECParamMarshaled(namedCurve string) (ecParamMarshaled []byte, err error) + type EcdsaKey struct + PrivKey *ecdsa.PrivateKey + PubKey *ecdsa.PublicKey + SKI SubjectKeyIdentifier + func (k *EcdsaKey) DeriveSharedSecret(anotherPublicKey *ecdsa.PublicKey) (secret []byte, err error) + func (k *EcdsaKey) GenSKI() (ski []byte) + func (k *EcdsaKey) Generate(namedCurve string) (err error) + func (k *EcdsaKey) ImportPrivKeyFromFile(file string) (err error) + func (k *EcdsaKey) ImportPubKeyFromCertFile(file string) (err error) + func (k *EcdsaKey) SignMessage(message string) (signature string, err error) + func (k *EcdsaKey) VerifySignature(message string, signature string) (verified bool) + type Pkcs11Library struct + Info pkcs11.Info + Path string + type Pkcs11Object struct + CKA_CLASS string + CKA_ID string + CKA_LABEL string + Count string + ObjectHandle pkcs11.ObjectHandle + type Pkcs11Wrapper struct + Context *pkcs11.Ctx + Library Pkcs11Library + Session pkcs11.SessionHandle + SlotLabel string + SlotPin string + func (p11w *Pkcs11Wrapper) CloseContext() + func (p11w *Pkcs11Wrapper) FindObjects(template []*pkcs11.Attribute, max int) (p11ObjHandlers []pkcs11.ObjectHandle, moreThanMax bool, err error) + func (p11w *Pkcs11Wrapper) ImportECKey(ec EcdsaKey) (err error) + func (p11w *Pkcs11Wrapper) ImportECKeyFromFile(file string) (err error) + func (p11w *Pkcs11Wrapper) InitContext() (err error) + func (p11w *Pkcs11Wrapper) InitSession() (err error) + func (p11w *Pkcs11Wrapper) ListObjects(template []*pkcs11.Attribute, max int) + func (p11w *Pkcs11Wrapper) Login() (err error) + func (p11w *Pkcs11Wrapper) SignMessage(message string, key pkcs11.ObjectHandle) (signature string, err error) + func (p11w *Pkcs11Wrapper) SignMessageAdvanced(data []byte, key pkcs11.ObjectHandle, mechanism *pkcs11.Mechanism) (signature string, err error) + func (p11w *Pkcs11Wrapper) VerifySignature(message string, signature string, key pkcs11.ObjectHandle) (verified bool, err error) + type SubjectKeyIdentifier struct + Sha1 string + Sha1Bytes []byte + Sha256 string + Sha256Bytes []byte