utils

package
v0.0.0-...-a58a8a6 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeAddress

func DecodeAddress(address string, alphabet *base58.Alphabet, version uint8) ([]byte, error)

DecodeAddress convert address to bytes

func DecodeBase58

func DecodeBase58(alphabet *base58.Alphabet, version uint8, input string) (decodedBytes []byte, err error)

DecodeBase58 decode string to bytes

func EncodeBase58

func EncodeBase58(alphabet *base58.Alphabet, version uint8, bytes []byte) string

EncodeBase58 encode bytes to string

func Sha256Util

func Sha256Util(bytes []byte) []byte

Sha256Util create sha256 and write bytes

Types

type Sha512

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

Sha512 struct

func NewSha512

func NewSha512() *Sha512

NewSha512 create Sha512

func (*Sha512) Add

func (s *Sha512) Add(bytes []byte) (int, error)

Add write bytes

func (*Sha512) Add32

func (s *Sha512) Add32(i uint32) (int, error)

Add32 write uint32

func (*Sha512) Finish

func (s *Sha512) Finish() []byte

Finish sum

func (*Sha512) Finish128

func (s *Sha512) Finish128() []byte

Finish128 get 16 bytes

func (*Sha512) Finish256

func (s *Sha512) Finish256() []byte

Finish256 get 32 bytes

Jump to

Keyboard shortcuts

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