t6b1

package
v0.5.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package ternary implements ternary encoding as specified by the IOTA Protocol RFC-0015. https://github.com/Wollac/iota-crypto-demo/blob/master/pkg/encoding/ternary/ternary.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToTrytes

func BytesToTrytes(bytes []byte) (trinary.Trytes, error)

BytesToTrytes converts a bit string into its ternary representation encoding one byte a two trytes.

func MustBytesToTrytes

func MustBytesToTrytes(bytes []byte) trinary.Trytes

MustBytesToTrytes converts a bit string into its ternary representation encoding one byte a two trytes. The input is not validated before the computation.

func MustTrytesToBytes

func MustTrytesToBytes(trytes trinary.Trytes) []byte

MustTrytesToBytes the ternary representation of a bit string back to its original slice of bytes. The input is not validated before the computation.

func TrytesToBytes

func TrytesToBytes(trytes trinary.Trytes) ([]byte, error)

TrytesToBytes the ternary representation of a bit string back to its original slice of bytes.

func ValidBytesForTrytes

func ValidBytesForTrytes(bytes []byte) error

ValidBytesForTrytes checks whether the given slice of bytes is a valid input for BytesToTrytes.

func ValidTrytesForBytes

func ValidTrytesForBytes(trytes trinary.Trytes) error

ValidTrytesForBytes checks whether the given trytes are a valid input for TrytesToBytes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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