algorithmTypes

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash

type Hash int

Hash specifies a hash algorithm type

const (
	NoHashAlgo Hash = iota
	Sha256
	Sha384
	Sha512
	Shake256
	Fnv64
	Fnv128
)

func (Hash) MarshalJSON

func (r Hash) MarshalJSON() ([]byte, error)

MarshalJSON is generated so Hash satisfies json.Marshaler.

func (Hash) String

func (i Hash) String() string

func (*Hash) UnmarshalJSON

func (r *Hash) UnmarshalJSON(data []byte) error

UnmarshalJSON is generated so Hash satisfies json.Unmarshaler.

type Signature

type Signature int

Signature specifies a signature algorithm type

const (
	Ed25519 Signature = iota + 1
	Ed448
)

func AtoSig

func AtoSig(str string) (Signature, error)

AtoSig returns a signature algorithm type based on common string representation thereof.

func (Signature) MarshalJSON

func (r Signature) MarshalJSON() ([]byte, error)

MarshalJSON is generated so Signature satisfies json.Marshaler.

func (Signature) String

func (i Signature) String() string

func (*Signature) UnmarshalJSON

func (r *Signature) UnmarshalJSON(data []byte) error

UnmarshalJSON is generated so Signature satisfies json.Unmarshaler.

Jump to

Keyboard shortcuts

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