service

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPkcs11

func NewPkcs11(
	ctx context.Context,
	pkcs11Api pkcs11api.Pkcs11,
	pin string,
	slotID int,
	partitionID int64,
) (service *pkcs11Service, err error)

Types

type Pkcs11

type Pkcs11 interface {
	GenerateXpriv(
		ctx context.Context,
		seedByteLength uint,
		seedLabel,
		xprivLabel string,
		canExport bool,
	) error

	ImportXprivFromSeed(
		ctx context.Context,
		seed []byte,
		xprivLabel string,
		canExport bool,
	) error

	ImportXpriv(
		ctx context.Context,
		xpriv string,
		xprivLabel string,
		canExport bool,
	) error

	ExportXpriv(
		ctx context.Context,
		xprivLabel string,
	) (xpriv string, err error)

	FindKeyByLabel(
		ctx context.Context,
		xprivLabel string,
	) error
	SignByDeriveKey(
		ctx context.Context,
		xprivLabel string,
		path string,
		message []byte,
	) (signature []byte, err error)
	GetPublicKeyByDeriveKey(
		ctx context.Context,
		xprivLabel string,
		path string,
	) (publicKey []byte, err error)
	VerifyByDeriveKey(
		ctx context.Context,
		xprivLabel string,
		path string,
		message []byte,
		signature []byte,
	) (err error)
	DeriveKeysByLabel(
		ctx context.Context,
		xprivLabel string,
		basePath string,
		count uint32,
	) error
}

Jump to

Keyboard shortcuts

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