Versions in this module Expand all Collapse all v1 v1.0.5 Sep 1, 2026 v1.0.4 Aug 30, 2026 Changes in this version + var ErrKeyNotFound = errors.New("pkcs11: no object matches the key uri") + var ErrKeyURIRequired = errors.New("pkcs11: key uri is required") + var ErrModuleRequired = errors.New("pkcs11: module path is required") + var ErrOAEPHashUnsupported = errors.New(...) + var ErrPinRequired = errors.New("pkcs11: pin provider is required") + var ErrSecretNotExtractable = errors.New(...) + var ErrTokenRequired = errors.New("pkcs11: token label or slot id is required") + var ErrUnavailable = errors.New(...) + func Shutdown(ctx context.Context) error + type AsymmetricRepository interface + ECDH_Decode func(ctx context.Context, input models.ECDHDecodeRequest) (string, error) + ECDH_Encode func(ctx context.Context, input models.ECDHEncodeRequest) (string, error) + GenerateECDHCurveKeys func(ctx context.Context, input models.GenerateECDHCurveKeyRequest) (*models.KeyData, error) + GenerateRSAKeys func(ctx context.Context, input models.GenerateRSAKeyRequest) (*models.KeyData, error) + RSA_OAEP_Decode func(ctx context.Context, input models.RSAOAEPDecodeRequest) (string, error) + RSA_OAEP_Encode func(ctx context.Context, input models.RSAOAEPEncodeRequest) (string, error) + func NewAsymmetricRepository(opts ...Option) AsymmetricRepository + type HashRepository interface + Blake3 func(ctx context.Context, message string) string + HMAC func(ctx context.Context, secretKey, message string) string + Sha256Hex func(ctx context.Context, message string) string + func NewHashRepository(opts ...Option) HashRepository + type KeyRepository interface + DeactivateKey func(ctx context.Context, input models.DeactivateKeyRequest) error + GetKey func(ctx context.Context, input models.GetKeyRequest) (*models.KeyData, error) + RotateKey func(ctx context.Context, input models.RotateKeyRequest) (*models.KeyData, error) + func NewKeyRepository(opts ...Option) KeyRepository + type Option func(*config) + func WithAllowSecretExtraction(allow bool) Option + func WithDeactivateDestroys(destroy bool) Option + func WithKeyURI(uri string) Option + func WithMaxSessions(n int) Option + func WithModulePath(path string) Option + func WithPinProvider(provider PinProvider) Option + func WithRotateDisablesPrevious(disable bool) Option + func WithSlotID(id uint64) Option + func WithTokenLabel(label string) Option + type PinProvider func(ctx context.Context) (string, error) + type Repository struct + func NewRepository(opts ...Option) *Repository + func (repository *Repository) Close() error + type SignatureRepository interface + GenerateEd255Keys func(ctx context.Context) (*models.KeyData, error) + SignEd25519 func(ctx context.Context, privateKey, text string) (string, error) + SignRSAPSS func(ctx context.Context, privateKey, text string) (string, error) + Sign_RSA_PKCS1v15_SHA256 func(ctx context.Context, privateKey, data string) (string, error) + VerifyEd25519 func(ctx context.Context, publicKey, text, signature string) error + VerifyRSAPSS func(ctx context.Context, publicKey, text, signature string) error + Verify_RSA_PKCS1v15_SHA256 func(ctx context.Context, data, publicKey string, signature string) error + func NewSignatureRepository(opts ...Option) SignatureRepository + type SymmetricRepository interface + DecryptAES func(ctx context.Context, input models.DecryptAESRequest) (string, error) + EncryptAES func(ctx context.Context, input models.EncryptAESRequest) (string, error) + GenerateSymetrycKeys func(ctx context.Context, input models.GenerateSymmetricKeyRequest) (*models.KeyData, error) + func NewSymmetricRepository(opts ...Option) SymmetricRepository