util

package
v0.0.0-...-6b88563 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(ciph cipher.Block, ciphertext []byte) ([]byte, error)

Decrypt data

func DoubleHash

func DoubleHash(data []byte) []byte

DoubleHash double SHA256

func Encrypt

func Encrypt(ciph cipher.Block, text []byte) ([]byte, error)

Encrypt data

func Hash160

func Hash160(data []byte) []byte

Hash160 is SHA250 followed by RIPEMD160

func PubKeyFromPrivate

func PubKeyFromPrivate(private []byte) []byte

PubKeyFromPrivate retrieve public key from a private key

Types

type ECDSASigner

type ECDSASigner struct{}

ECDSASigner the ECDSA signer struct

func (*ECDSASigner) NewKey

func (eS *ECDSASigner) NewKey() ([]byte, []byte, error)

NewKey Generates a new keypair

func (*ECDSASigner) Sign

func (eS *ECDSASigner) Sign(private, data []byte) ([]byte, error)

Sign data with a private key

Jump to

Keyboard shortcuts

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