zarith

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(source []byte) (*big.Int, error)

Decode decodes a zarith encoded number from the entire input byte array. Assumes the input contains no extra trailing bytes.

func DecodeHex

func DecodeHex(source string) (*big.Int, error)

DecodeHex decodes a zarith encoded number from the entire input hex string. Assumes the input contains no extra trailing bytes.

func Encode

func Encode(value *big.Int) ([]byte, error)

Encode encodes a number to zarith

func EncodeToHex

func EncodeToHex(value *big.Int) (string, error)

EncodeToHex encodes a number to zarith

func ReadNext

func ReadNext(byteStream []byte) (*big.Int, int, error)

ReadNext reads the next variable-length zarith number from the given byte stream. Returns the zarith number and the count of bytes read. Extra bytes are ignored.

Types

This section is empty.

Jump to

Keyboard shortcuts

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