encoding

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: GPL-3.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(msg, fromPub, toPub string, nonce uint64, wif string) (string, error)

Decrypt calculates a shared secret by the receivers private key and the senders public key, then decrypts the given memo message.

Types

type Encoder

type Encoder struct {
	// contains filtered or unexported fields
}

func NewEncoder

func NewEncoder(w io.Writer) *Encoder

func (*Encoder) Encode

func (encoder *Encoder) Encode(v interface{}) error

func (*Encoder) EncodeBool

func (encoder *Encoder) EncodeBool(b bool) error

func (*Encoder) EncodeLittleEndianUInt32

func (encoder *Encoder) EncodeLittleEndianUInt32(i uint32) error

func (*Encoder) EncodeLittleEndianUInt64

func (encoder *Encoder) EncodeLittleEndianUInt64(i uint64) error

func (*Encoder) EncodeMoney

func (encoder *Encoder) EncodeMoney(s string) error

func (*Encoder) EncodeNumber

func (encoder *Encoder) EncodeNumber(v interface{}) error

func (*Encoder) EncodeUVarint

func (encoder *Encoder) EncodeUVarint(i uint64) error

func (*Encoder) EncodeVarint

func (encoder *Encoder) EncodeVarint(i int64) error

type Marshaller

type Marshaller interface {
	Marshal(*Encoder) error
}

type RollingEncoder

type RollingEncoder struct {
	// contains filtered or unexported fields
}

func NewRollingEncoder

func NewRollingEncoder(next *Encoder) *RollingEncoder

func (*RollingEncoder) Encode

func (encoder *RollingEncoder) Encode(v interface{})

func (*RollingEncoder) EncodeBool

func (encoder *RollingEncoder) EncodeBool(v bool)

func (*RollingEncoder) EncodeLittleEndianUInt32

func (encoder *RollingEncoder) EncodeLittleEndianUInt32(i uint32)

func (*RollingEncoder) EncodeLittleEndianUInt64

func (encoder *RollingEncoder) EncodeLittleEndianUInt64(i uint64)

func (*RollingEncoder) EncodeMoney

func (encoder *RollingEncoder) EncodeMoney(s string)

func (*RollingEncoder) EncodeNumber

func (encoder *RollingEncoder) EncodeNumber(v interface{})

func (*RollingEncoder) EncodeUVarint

func (encoder *RollingEncoder) EncodeUVarint(i uint64)

func (*RollingEncoder) EncodeVarint

func (encoder *RollingEncoder) EncodeVarint(i int64)

func (*RollingEncoder) Err

func (encoder *RollingEncoder) Err() error

Jump to

Keyboard shortcuts

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