mtg

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: GPL-3.0 Imports: 15 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 Decrypt

func Decrypt(b []byte, privateKey ed25519.PrivateKey) ([]byte, error)

func Encode

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

func Encrypt

func Encrypt(body []byte, privateKey ed25519.PrivateKey, publicKey ed25519.PublicKey) ([]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)

Jump to

Keyboard shortcuts

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