crypto

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: LGPL-2.1 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bech32AddressFromPrivateKeyEDD

func Bech32AddressFromPrivateKeyEDD(privateKey string) string

func GetPublicKeyECC

func GetPublicKeyECC(privKey string) string

func GetPublicKeyEDD

func GetPublicKeyEDD(privKey string) string

func GetPublicKeySECP

func GetPublicKeySECP(privKey string) string

func GetSignerECC

func GetSignerECC(message *[]byte, signature *string) (string, error)

func Keccak256Hash

func Keccak256Hash(message []byte) []byte

func NetworkPrivateKeyFromString

func NetworkPrivateKeyFromString(privKey string) (*ecdsa.PrivateKey, error)

func Sha256

func Sha256(s []byte) []byte

func SignECC

func SignECC(message []byte, privKey string) ([]byte, string)

func SignEDD

func SignEDD(message []byte, privKey string) ([]byte, string)

func SignSECP

func SignSECP(message []byte, privKey string) ([]byte, string)

func ToBech32Address

func ToBech32Address(publicKey []byte, prefix string) string

func ToBtcecSignature

func ToBtcecSignature(sigHex string) (*[]byte, error)

30440220 8ee622395fd93884b700406e9f297914b1934d31cece58992897901d6f1930210220296c724c79c5875930fad760f49073b99bf0514d43d2499c0982 8ee622395fd93884b700406e9f297914b1934d31cece58992897901d6f193021296c724c79c5875930fad760f49073b99bf0514d43d2499c0982 6169eb06fe82

func VerifySignatureAmino

func VerifySignatureAmino(signedData string, signature []byte, account string, pubKey []byte) (bool, error)

func VerifySignatureECC

func VerifySignatureECC(signer string, message *[]byte, signature string) bool

func VerifySignatureEDD

func VerifySignatureEDD(signer string, message *[]byte, signature string) (bool, error)

func VerifySignatureSECP

func VerifySignatureSECP(publicKeyBytes []byte, message []byte, signatureByte []byte) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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