crypto

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESDecrypt

func AESDecrypt(crypted, key []byte) ([]byte, error)

AESDecrypt decrypts the encrypted source with the given key.

func AESEncrypt

func AESEncrypt(src, key []byte) ([]byte, error)

AESEncrypt encrypts the key with the given source.

func AddressFromUint160

func AddressFromUint160(u util.Uint160) string

AddressFromUint160 returns the "NEO address" from the given Uint160.

func Base58CheckDecode

func Base58CheckDecode(s string) (b []byte, err error)

Base58CheckDecode decodes the given string.

func Base58CheckEncode

func Base58CheckEncode(b []byte) string

Base58CheckEncode encodes b into a base-58 check encoded string.

func Uint160DecodeAddress

func Uint160DecodeAddress(s string) (u util.Uint160, err error)

Uint160DecodeAddress attempts to decode the given NEO address string into an Uint160.

Types

type MerkleTree

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

MerkleTree implementation.

func NewMerkleTree

func NewMerkleTree(hashes []util.Uint256) (*MerkleTree, error)

NewMerkleTree returns new MerkleTree object.

func (*MerkleTree) Root

func (t *MerkleTree) Root() util.Uint256

Root return the computed root hash of the MerkleTree.

type MerkleTreeNode

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

MerkleTreeNode represents a node in the MerkleTree.

func (*MerkleTreeNode) IsLeaf

func (n *MerkleTreeNode) IsLeaf() bool

IsLeaf returns whether this node is a leaf node or not.

func (*MerkleTreeNode) IsRoot

func (n *MerkleTreeNode) IsRoot() bool

IsRoot returns whether this node is a root node or not.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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