crypto

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package crypto implements need helpers for invitation chain use. We haven't yet thought about interface or other stuff. We just build the minimum for the PoC.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqualBytes

func EqualBytes(a, b []byte) bool

func RandSlice

func RandSlice(n int) []byte

func VerifySign

func VerifySign(pubKey PubKey, msg []byte, sig Signature) bool

Types

type Key

type Key struct {
	PrivKey []byte
	PubKey
}

Key is a struct for full key.

func NewKey

func NewKey() Key

func (Key) PubKeyEqual

func (k Key) PubKeyEqual(pubKey PubKey) bool

func (Key) Sign

func (k Key) Sign(h []byte) Signature

func (Key) VerifySign

func (k Key) VerifySign(msg []byte, sig Signature) bool

type PubKey

type PubKey = []byte

type Signature

type Signature = []byte

Jump to

Keyboard shortcuts

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