Documentation ¶
Index ¶
- Constants
- Variables
- type Crypto
- func (c *Crypto) CloseSession(session pkcs11.SessionHandle) error
- func (c *Crypto) FinalizeCrypto() error
- func (c *Crypto) FindObject(session pkcs11.SessionHandle, label string) ([]uint8, pkcs11.ObjectHandle, error)
- func (c *Crypto) GenerateED25519KeyPair(session pkcs11.SessionHandle, publicKeyLabel, privateKeyLabel string) (string, string, pkcs11.ObjectHandle, pkcs11.ObjectHandle, error)
- func (c *Crypto) Login(session pkcs11.SessionHandle, password string) error
- func (c *Crypto) Logout(session pkcs11.SessionHandle) error
- func (c *Crypto) OpenSession(slot uint) (pkcs11.SessionHandle, error)
- func (c *Crypto) Sign(session pkcs11.SessionHandle, privateKey pkcs11.ObjectHandle, data []byte) ([]byte, error)
- func (c *Crypto) Verify(session pkcs11.SessionHandle, publicKey pkcs11.ObjectHandle, data []byte, ...) error
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 (*Crypto) CloseSession ¶
func (c *Crypto) CloseSession(session pkcs11.SessionHandle) error
func (*Crypto) FinalizeCrypto ¶
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) 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
Click to show internal directories.
Click to hide internal directories.