crypto

package
v0.0.0-...-822dead Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keypair

type Keypair struct {
	PrivateKey PrivateK
	PublicKey  PublicK
}

func Gen

func Gen(typ int, bits int) Keypair

func GenEd25519

func GenEd25519() Keypair

func LoadKey

func LoadKey(filename string) Keypair

func (*Keypair) PubID

func (k *Keypair) PubID() string

func (*Keypair) Save

func (k *Keypair) Save(filename string) (ok bool)

func (*Keypair) Serialize

func (k *Keypair) Serialize() SerializedKey

func (*Keypair) Sign

func (k *Keypair) Sign(b []byte) (string, error)

type PrivateK

type PrivateK crypto.PrivKey

type PublicK

type PublicK crypto.PubKey

func ParsePublicKey

func ParsePublicKey(str string) PublicK

type SerializedKey

type SerializedKey struct {
	Pub    string
	Priv   string
	Pubcid string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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