signature

package
v0.1.1-3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token struct {
	AddrHash  hash.Hash
	RoutingID string
	Expiry    time.Time
	Signature []byte
}

Token holds all info for an invitation

func NewInviteToken

func NewInviteToken(addrHash hash.Hash, routingID string, validUntil time.Time, pk bmcrypto.PrivKey) (*Token, error)

NewInviteToken will create a new invitation token that can be used to create an address on a mailserver

func ParseInviteToken

func ParseInviteToken(data string) (*Token, error)

ParseInviteToken parses data as generated by inviteToken.String() into a token

func (*Token) String

func (token *Token) String() string

String converts a invite token to a string representation

func (*Token) Verify

func (token *Token) Verify(routingID string, pubKey bmcrypto.PubKey) bool

Verify will verify a token/signature against the given data

Jump to

Keyboard shortcuts

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