identity

package
v0.4.20-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: ISC Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Identity

type Identity struct {
	Identifier uuid.UUID
	Address    string
	Keypair    keypair.KeyPair
}

func FromBytes

func FromBytes(data []byte) (*Identity, error)

func New

func New(address string, keypair keypair.KeyPair) (*Identity, error)

func (*Identity) GetAddress

func (i *Identity) GetAddress() string

func (*Identity) GetIdentifier

func (i *Identity) GetIdentifier() uuid.UUID

func (*Identity) GetKeypair

func (i *Identity) GetKeypair() keypair.KeyPair

func (*Identity) GetPrivateKey

func (i *Identity) GetPrivateKey() []byte

func (*Identity) GetPublicKey

func (i *Identity) GetPublicKey() []byte

func (*Identity) Sign

func (i *Identity) Sign(data []byte) []byte

func (*Identity) ToBytes

func (i *Identity) ToBytes() ([]byte, error)

func (*Identity) Verify

func (i *Identity) Verify(data []byte, signature []byte) bool

Jump to

Keyboard shortcuts

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