mtg

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodePrivateKey

func DecodePrivateKey(s string) (ed25519.PrivateKey, error)

func DecodePublicKey

func DecodePublicKey(s string) (ed25519.PublicKey, error)

func Encode

func Encode(values ...interface{}) ([]byte, error)

func Pack

func Pack(body, sig []byte) []byte

func Scan

func Scan(body []byte, dest ...interface{}) ([]byte, error)

func Sign

func Sign(body []byte, privateKey ed25519.PrivateKey) []byte

func Unpack

func Unpack(b []byte) (body, sig []byte, err error)

func Verify

func Verify(body, sig []byte, publicKey ed25519.PublicKey) bool

Types

type RawMessage

type RawMessage []byte

func (RawMessage) MarshalBinary

func (r RawMessage) MarshalBinary() ([]byte, error)

func (*RawMessage) Scan

func (r *RawMessage) Scan(src interface{}) error

func (*RawMessage) UnmarshalBinary

func (r *RawMessage) UnmarshalBinary(data []byte) error

func (RawMessage) Value

func (r RawMessage) Value() (driver.Value, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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