identity

package
v0.9.13 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package identity defines interfaces & methods that describes users on qri

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyIDFromPriv

func KeyIDFromPriv(pk crypto.PrivKey) (string, error)

KeyIDFromPriv is a wrapper for calling KeyIDFromPub on a private key

func KeyIDFromPub

func KeyIDFromPub(pubKey crypto.PubKey) (string, error)

KeyIDFromPub returns the base58btc-encoded multihash string of a public key hash. hashes are 32-byte sha2-256 sums of public key bytes KeyID is a unique identifier for a keypair

Types

type Author added in v0.9.3

type Author interface {
	AuthorID() string
	AuthorPubKey() crypto.PubKey
	Username() string
}

Author uses keypair cryptography to distinguish between different log sources (authors)

func NewAuthor added in v0.9.3

func NewAuthor(id string, pubKey crypto.PubKey, username string) Author

NewAuthor creates an Author interface implementation, allowing outside packages needing to satisfy the Author interface

Jump to

Keyboard shortcuts

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