ki

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 7 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ADRVerify

func ADRVerify(adrStr string) *errors.Error

Types

type ADR

type ADR string
const (
	UnkADR ADR = "?"
)

func ADROf

func ADROf(adrStr string) (ADR, *errors.Error)

func (ADR) S

func (a ADR) S() string

type Ki

type Ki struct {
	ADR ADR      `json:"adr"`
	PUB PUB      `json:"pub"`
	PRI PRI      `json:"pri"`
	MIC Mnemonic `json:"mic"`
}

func NewKi

func NewKi() (*Ki, *errors.Error)

type Mnemonic

type Mnemonic string

func (Mnemonic) S

func (m Mnemonic) S() string

type PRI

type PRI string

func (PRI) GetPUB added in v1.0.3

func (pri PRI) GetPUB() (ADR, PUB, *errors.Error)

func (PRI) S

func (pri PRI) S() string

func (PRI) Sign added in v1.0.1

func (pri PRI) Sign(message string) (string, *errors.Error)

type PUB

type PUB string

func (PUB) S added in v1.0.1

func (pub PUB) S() string

func (PUB) VerifySignature added in v1.0.1

func (pub PUB) VerifySignature(message string, signStr string) (bool, *errors.Error)

Jump to

Keyboard shortcuts

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