id

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNilOwnerKeyContainer = errors.New("owner-key container is nil")

ErrNilOwnerKeyContainer is returned by functions that expect a non-nil OwnerKeyContainer, but received nil.

Functions

func VerifyKey

func VerifyKey(src OwnerKeyContainer) error

VerifyKey checks if the public key converts to owner ID.

If passed OwnerKeyContainer is nil, ErrNilOwnerKeyContainer returns. If public key cannot be unmarshaled, service.ErrInvalidPublicKeyBytes returns. If public key is not converted to owner ID, service.ErrWrongOwner returns. With neo:morph adoption public key can be unrelated to owner ID. In this case VerifyKey should call NeoFS.ID smart-contract to check whether public key is bounded with owner ID. If there is no bound, then return service.ErrWrongOwner.

Types

type OwnerID

type OwnerID = container.OwnerID

type OwnerKeyContainer

type OwnerKeyContainer interface {
	GetOwnerID() OwnerID
	GetOwnerKey() []byte
}

OwnerKeyContainer is an interface of the container of owner's ID and key pair with read access.

Jump to

Keyboard shortcuts

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