identity

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: Apache-2.0 Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnonymousIdentity

type AnonymousIdentity struct{}

func (AnonymousIdentity) PublicKey

func (id AnonymousIdentity) PublicKey() []byte

func (AnonymousIdentity) Sender

func (id AnonymousIdentity) Sender() principal.Principal

func (AnonymousIdentity) Sign

func (id AnonymousIdentity) Sign(msg []byte) []byte

type Ed25519Identity

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

func NewEd25519Identity

func NewEd25519Identity(publicKey ed25519.PublicKey, privateKey ed25519.PrivateKey) Ed25519Identity

func NewEd25519IdentityFromPEM

func NewEd25519IdentityFromPEM(data []byte) (*Ed25519Identity, error)

func (Ed25519Identity) PublicKey

func (id Ed25519Identity) PublicKey() []byte

func (Ed25519Identity) Sender

func (id Ed25519Identity) Sender() principal.Principal

func (Ed25519Identity) Sign

func (id Ed25519Identity) Sign(data []byte) []byte

func (Ed25519Identity) ToPEM

func (id Ed25519Identity) ToPEM() ([]byte, error)

type Identity

type Identity interface {
	Sender() principal.Principal
	Sign(msg []byte) []byte
	PublicKey() []byte
}

Jump to

Keyboard shortcuts

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