secure

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrivateKey

type PrivateKey struct {
	PublicKey
	// contains filtered or unexported fields
}

func Curve25519PrivateKey

func Curve25519PrivateKey(privateKey string) (*PrivateKey, error)

func GenerateCurve25519

func GenerateCurve25519() (*PrivateKey, error)

func (*PrivateKey) SharedKey

func (key *PrivateKey) SharedKey(pubKey string) ([]byte, error)

func (*PrivateKey) String

func (key *PrivateKey) String() string

type ProvideSecretKey added in v0.1.0

type ProvideSecretKey func(pubKey string) ([]byte, error)

type PublicKey

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

func (*PublicKey) String

func (key *PublicKey) String() string

type SymmAlgo added in v0.1.0

type SymmAlgo interface {
	Encrypt(data []byte, pubKey string) ([]byte, error)
	Decrypt(data []byte, pubKey string) ([]byte, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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