tscec

package
v0.0.0-...-e64f1e1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2018 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base58Decode

func Base58Decode(input []byte) []byte

Base58Decode 对编码格式为 Base58 的输入数据做解码操作

func Base58Encode

func Base58Encode(input []byte) []byte

Base58Encode 对输入数据做 Base58 编码

func ComputeMerklePath

func ComputeMerklePath(leaves []string, leafIndex uint32) []string

func ComputeMerkleRoot

func ComputeMerkleRoot(leaves []string) string

func ComputeMerkleRootFromPath

func ComputeMerkleRootFromPath(leafHash string, merklePath []string, leafIndex uint32) string

func GenerateAddrByPubkey

func GenerateAddrByPubkey(publicKey []byte) []byte

GenerateAddrByPubkey 计算公钥对应的地址

func GeneratePubkeyByPrvkey

func GeneratePubkeyByPrvkey(p []byte) ([]byte, error)

GeneratePubkeyByPrvkey 根据私钥计算公钥

func HashPublicKey

func HashPublicKey(publicKey []byte) []byte

HashPublicKey 哈希公钥

func IntToHex

func IntToHex(num int64) []byte

IntToHex converts an int64 to a byte array

func NewKeyPair

func NewKeyPair() ([]byte, []byte)

NewKeyPair 生成公私钥对

func ReverseBytes

func ReverseBytes(data []byte)

ReverseBytes reverses a byte array

func Sign

func Sign(pkBytes []byte, data []byte, isHash bool) string

Sign 签名

func Verify

func Verify(pubkey, sig, data []byte) bool

Verify 验证签名

Types

This section is empty.

Jump to

Keyboard shortcuts

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