crypto

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func B58cdecode

func B58cdecode(payload string, prefix []byte) []byte

func B58cencode

func B58cencode(payload []byte, prefix Prefix) string

B58cencode encodes a byte array into base58 with prefix

func Decode

func Decode(encoded string) ([]byte, error)

func Encode

func Encode(dataBytes []byte) string

func RoundPlus

func RoundPlus(f float64, places int) float64

Helper Functions to round float64

Types

type Prefix

type Prefix []byte
var (
	// For (de)constructing addresses
	Prefix_tz1       Prefix = []byte{6, 161, 159}
	Prefix_edsk      Prefix = []byte{43, 246, 78, 7}
	Prefix_edsk2     Prefix = []byte{13, 15, 58, 7}
	Prefix_edpk      Prefix = []byte{13, 15, 37, 217}
	Prefix_edesk     Prefix = []byte{7, 90, 60, 179, 41}
	Prefix_edsig     Prefix = []byte{9, 245, 205, 134, 18}
	Prefix_watermark Prefix = []byte{3}
)

Jump to

Keyboard shortcuts

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