applese

package
v0.0.0-...-50fbe42 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package sw provides an ECDH implementation backed by an Apple Secure Enclave.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveKey

func RemoveKey(key KeyLabel) (bool, error)

RemoveKey tries to delete a key identified by label, tag and hash. hash is the SHA1 of the key. Can be nil If hash is nil then all the keys that match the label and tag specified will be deleted. Returns true if the key was found and deleted successfully

Types

type KeyLabel

type KeyLabel [sha1.Size]byte

func (KeyLabel) String

func (l KeyLabel) String() string

type PrivateKey

type PrivateKey C.SecKeyRef

func GenerateKey

func GenerateKey(label string) (PrivateKey, error)

GenerateKey creates a key with the given label and tag. Returns public key raw data.

func Keys

func Keys(hash []byte) ([]PrivateKey, error)

func PrivateKeyByLabel

func PrivateKeyByLabel(label KeyLabel) (PrivateKey, error)

func (PrivateKey) DH

func (k PrivateKey) DH(pk dh.PublicKey) ([]byte, error)

func (PrivateKey) Label

func (k PrivateKey) Label() KeyLabel

func (PrivateKey) Public

func (k PrivateKey) Public() dh.PublicKey

Jump to

Keyboard shortcuts

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