validation

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IssuerSeparator constant separator between DID identifier and name
	IssuerSeparator = "#"

	// IdentifierPrefix constant prefix for Iotics DID identifiers
	IdentifierPrefix = "did:iotics:"

	// IoticsPathPrefix Iotics path prefix used for deterministic keys
	IoticsPathPrefix = "iotics/0"

	// NamePattern regular expression for DID key names
	NamePattern = "[a-zA-Z\\-\\_0-9]{1,24}"
)

Variables

This section is empty.

Functions

func Blake2bSum160

func Blake2bSum160(src []byte) ([]byte, error)

Blake2bSum160 Helper function to make blame2b.Sum160

func ValidateIdentifier

func ValidateIdentifier(did string) error

ValidateIdentifier validates decentralised identifier. @param did: decentralised identifier

func ValidateIssuer

func ValidateIssuer(issuer string) error

ValidateIssuer validates issuer

func ValidateKeyName

func ValidateKeyName(keyName string) error

ValidateKeyName validates key name.

func ValidatePublicKey

func ValidatePublicKey(publicKeyBytes []byte) error

ValidatePublicKey validated public key bytes are valid public key

Types

This section is empty.

Jump to

Keyboard shortcuts

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