utils

package
v0.0.0-...-062b61a Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplySha256

func ApplySha256(record string) string

func AverageInt64

func AverageInt64(xs []int64) float64

func Compress

func Compress(s []byte) []byte

func Decompress

func Decompress(s []byte) ([]byte, error)

func GenerateKey

func GenerateKey() (*ecdsa.PrivateKey, error)

func GenerateSignature

func GenerateSignature(transactionId string) (string, error)

func GetKeyFromPEMKey

func GetKeyFromPEMKey() (*ecdsa.PrivateKey, error)

func GetKeyStringFromPEMKey

func GetKeyStringFromPEMKey() (string, error)

func GetPublicIP

func GetPublicIP() (string, error)

func GetPublicKeyFromPublicPEMKey

func GetPublicKeyFromPublicPEMKey() (*ecdsa.PublicKey, error)

func GetPublicKeyStringFromPublicPEMKey

func GetPublicKeyStringFromPublicPEMKey() (string, error)

func ImportPEMKey

func ImportPEMKey(keyHexString string) (*ecdsa.PrivateKey, error)

func ReadInput

func ReadInput() string

func SavePEMKey

func SavePEMKey(key *ecdsa.PrivateKey) error

func SavePublicPEMKey

func SavePublicPEMKey(pubkey *ecdsa.PublicKey) error

func VerifySignature

func VerifySignature(publicKey *ecdsa.PublicKey, transactionId string, signature string) (bool, error)

Types

type Signature

type Signature struct {
	R *big.Int `json:"r"`
	S *big.Int `json:"s"`
}

Jump to

Keyboard shortcuts

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