utils

package
v0.0.0-...-ad20016 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base58FromString

func Base58FromString(str string) ([]byte, error)

func Base58FromStringMust

func Base58FromStringMust(str string) []byte

func Base58ToStr

func Base58ToStr(data []byte) string

func CreateKeyPair

func CreateKeyPair() (private []byte, public []byte, err error)

func Hash

func Hash(data []byte) []byte

func HashAll

func HashAll(allData ...[]byte) []byte

func Int64GetBytes

func Int64GetBytes(val int64) []byte

func JsonParseRaw

func JsonParseRaw(raw []byte, obj interface{}) error

func JsonParseStr

func JsonParseStr(jsonStr string, obj interface{}) error

func JsonSerializeRaw

func JsonSerializeRaw(obj interface{}) ([]byte, error)

func JsonSerializeStr

func JsonSerializeStr(obj interface{}) (string, error)

func SignCheck

func SignCheck(pub []byte, hash []byte, sig []byte) bool

func SignCreate

func SignCreate(priv []byte, pub []byte, hash []byte) (sig []byte, err error)

Types

type Base58JsonVal

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

func NewBase58JsonValFromData

func NewBase58JsonValFromData(val []byte) *Base58JsonVal

func NewBase58JsonValFromString

func NewBase58JsonValFromString(str string) (*Base58JsonVal, error)

func (*Base58JsonVal) Bytes

func (s *Base58JsonVal) Bytes() []byte

func (*Base58JsonVal) MarshalJSON

func (s *Base58JsonVal) MarshalJSON() ([]byte, error)

func (*Base58JsonVal) String

func (s *Base58JsonVal) String() string

func (*Base58JsonVal) UnmarshalJSON

func (s *Base58JsonVal) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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