crypto

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxMultisigPubkeyNum     = 20
	MaxP2shMultisigPubkeyNum = 16
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CryptoApi

type CryptoApi interface {
	EncryptAES(key, cbcIv, buffer string) (output string, err error)
	DecryptAES(key, cbcIv, buffer string) (output string, err error)
	EncodeBase64(buffer string) (output string, err error)
	DecodeBase64(base64 string) (output string, err error)
	EncodeBase58(buffer string, useChecksum bool) (output string, err error)
	DecodeBase58(base58 string, useChecksum bool) (output string, err error)
	Ripemd160(message string, hasText bool) (output string, err error)
	Sha256(message string, hasText bool) (output string, err error)
	Hash160(message string, hasText bool) (output string, err error)
	Hash256(message string, hasText bool) (output string, err error)
}

type CryptoApiImpl

type CryptoApiImpl struct{}

func NewCryptoApi

func NewCryptoApi() *CryptoApiImpl

NewScriptApi returns an object that defines the API for Script

func (*CryptoApiImpl) DecodeBase58

func (s *CryptoApiImpl) DecodeBase58(base58 string, useChecksum bool) (output string, err error)

func (*CryptoApiImpl) DecodeBase64

func (s *CryptoApiImpl) DecodeBase64(base64 string) (output string, err error)

func (*CryptoApiImpl) DecryptAES

func (s *CryptoApiImpl) DecryptAES(key, cbcIv, buffer string) (output string, err error)

func (*CryptoApiImpl) EncodeBase58

func (s *CryptoApiImpl) EncodeBase58(buffer string, useChecksum bool) (output string, err error)

func (*CryptoApiImpl) EncodeBase64

func (s *CryptoApiImpl) EncodeBase64(buffer string) (output string, err error)

func (*CryptoApiImpl) EncryptAES

func (s *CryptoApiImpl) EncryptAES(key, cbcIv, buffer string) (output string, err error)

func (*CryptoApiImpl) Hash160

func (s *CryptoApiImpl) Hash160(message string, hasText bool) (output string, err error)

func (*CryptoApiImpl) Hash256

func (s *CryptoApiImpl) Hash256(message string, hasText bool) (output string, err error)

func (*CryptoApiImpl) Ripemd160

func (s *CryptoApiImpl) Ripemd160(message string, hasText bool) (output string, err error)

func (*CryptoApiImpl) Sha256

func (s *CryptoApiImpl) Sha256(message string, hasText bool) (output string, err error)

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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