identity

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: Apache-2.0, BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PublicKeySize  = 32
	PrivateKeySize = 64
	SignatureSize  = 64
)
View Source
const (
	Private = Type(0)
	Public  = Type(1)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Identity

type Identity struct {
	Type       Type
	PublicKey  []byte
	PrivateKey []byte
}

func Generate

func Generate() *Identity

func New

func New(publicKey []byte, optionalPrivateKey ...[]byte) *Identity

func (*Identity) Sign

func (identity *Identity) Sign(data []byte) (sig []byte)

func (*Identity) VerifySignature

func (identity *Identity) VerifySignature(data []byte, signature []byte) bool

type Type

type Type int

Jump to

Keyboard shortcuts

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