security

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crypto

type Crypto interface {
	GeneratePrivateKey() (string, error)
	GenerateID(prvKey string) (string, error)
	GenerateSignature(data string, prvKey string) (string, error)
	GenerateHash(data string) string
	RecoverID(data string, signature string) (string, error)
}

type Keychain

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

func CreateKeychain

func CreateKeychain(coloniesDirName string) (*Keychain, error)

func (*Keychain) AddPrvKey

func (keychain *Keychain) AddPrvKey(id string, prvKey string) error

func (*Keychain) GetPrvKey

func (keychain *Keychain) GetPrvKey(id string) (string, error)

func (*Keychain) Remove

func (keychain *Keychain) Remove() error

type Validator

type Validator interface {
	RequireServerOwner(recoveredID string, serverID string) error
	RequireColonyOwner(recoveredID string, colonyID string) error
	RequireExecutorMembership(recoveredID string, colonyID string, approved bool) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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