hsm

package
v0.0.0-...-1305305 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const CKM_EC_EDWARDS_KEY_PAIR_GEN uint = pkcs11.CKM_VENDOR_DEFINED + 0xC01
View Source
const CKM_EDDSA uint = pkcs11.CKM_VENDOR_DEFINED + 0xC03

Variables

View Source
var LOGGER = logging.MustGetLogger("xdr-sign")

Functions

This section is empty.

Types

type Crypto

type Crypto struct {
	// contains filtered or unexported fields
}

func NewCrypto

func NewCrypto(lib string) *Crypto

func (*Crypto) CloseSession

func (c *Crypto) CloseSession(session pkcs11.SessionHandle) error

func (*Crypto) FinalizeCrypto

func (c *Crypto) FinalizeCrypto() error

func (*Crypto) FindObject

func (c *Crypto) FindObject(session pkcs11.SessionHandle, label string) ([]uint8, pkcs11.ObjectHandle, error)

func (*Crypto) GenerateED25519KeyPair

func (c *Crypto) GenerateED25519KeyPair(session pkcs11.SessionHandle, publicKeyLabel, privateKeyLabel string) (string, string, pkcs11.ObjectHandle, pkcs11.ObjectHandle, error)

func (*Crypto) Login

func (c *Crypto) Login(session pkcs11.SessionHandle, password string) error

func (*Crypto) Logout

func (c *Crypto) Logout(session pkcs11.SessionHandle) error

func (*Crypto) OpenSession

func (c *Crypto) OpenSession(slot uint) (pkcs11.SessionHandle, error)

func (*Crypto) Sign

func (c *Crypto) Sign(session pkcs11.SessionHandle, privateKey pkcs11.ObjectHandle, data []byte) ([]byte, error)

func (*Crypto) Verify

func (c *Crypto) Verify(session pkcs11.SessionHandle, publicKey pkcs11.ObjectHandle, data []byte, signature []byte) error

Jump to

Keyboard shortcuts

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