id

package
v0.0.0-...-a75b369 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: AGPL-3.0 Imports: 10 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ID

type ID [32]byte

ID is the type representing a generated ID.

func New

func New(data []byte) ID

New generates a new ID from the given input bytes.

func (ID) Compare

func (i ID) Compare(other ID) int

Compares the two given IDs. Note that this function is NOT SAFE AGAINST TIMING ATTACKS. If you are simply checking for equality, please use the Equals function, which is.

func (ID) Equals

func (i ID) Equals(other ID) bool

Checks the two given IDs for equality. This function uses a constant-time comparison algorithm to prevent timing attacks.

func (*ID) MarshalText

func (i *ID) MarshalText() ([]byte, error)

Implements the `TextMarshaler` interface from the encoding package.

func (ID) String

func (i ID) String() string

String returns the canonical representation of the ID.

func (*ID) UnmarshalText

func (i *ID) UnmarshalText(bs []byte) (err error)

Implements the `TextUnmarshaler` interface from the encoding package.

type ImproperCertsNumberError

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

ImproperCertsNumberError is returned from Server/Client whenever the remote peer presents a number of PeerCertificates that is not 1.

func (ImproperCertsNumberError) Error

func (e ImproperCertsNumberError) Error() string

Jump to

Keyboard shortcuts

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