fingerprint

package
v0.0.0-...-97e1097 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package fingerprint defines a protocol user's unique fingerprint.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Displayable

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

Displayable represents a string representation of a fingerprint.

func NewDisplayable

func NewDisplayable(local, remote []byte) (*Displayable, error)

NewDisplayable creates a new displayable fingerprint.

func (*Displayable) String

func (d *Displayable) String() string

type Fingerprint

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

Fingerprint represents a user's unique fingerprint.

func New

func New(
	version,
	iterations uint32,
	localID []byte,
	localKey identity.Key,
	remoteID []byte,
	remoteKey identity.Key,
) (*Fingerprint, error)

New creates a new fingerprint.

func (*Fingerprint) String

func (f *Fingerprint) String() string

type Scannable

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

Scannable represents a fingerprint to be displayed on a QR code.

func NewScannable

func NewScannable(version uint32, local, remote []byte) (*Scannable, error)

NewScannable creates a new scannable fingerprint.

func (*Scannable) Bytes

func (s *Scannable) Bytes() ([]byte, error)

Bytes returns an encoding of the scannable fingerprint.

func (*Scannable) Compare

func (s *Scannable) Compare(scanned []byte) (bool, error)

Compare compares a scanned QR code with the expected fingerprint.

Jump to

Keyboard shortcuts

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