keypair

package
v0.0.0-...-0cb4c35 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

toll

Index

Constants

View Source
const (
	PublicKeySize  = 32
	PrivateKeySize = 64
	SignatureSize  = 64
)
View Source
const (
	DePublicKeySize  = 32
	DePrivateKeySize = 32
	DeAddressSize    = 20
)

Variables

This section is empty.

Functions

func CheckAddress

func CheckAddress(Saddress string) bool

Verify the address key

func CheckPrivateKey

func CheckPrivateKey(SprivateKey string) bool

Verify the private key

func CheckPublicKey

func CheckPublicKey(publicKey string) bool

Verify the public key

func Create

func Create() (publicKey string, privateKey string, address string, err error)

Create

func DecodePrivateKey

func DecodePrivateKey(privateKey string) (decodePrivateKey *[DePrivateKeySize]byte, err error)

Decode private Key

func DecodePublicKey

func DecodePublicKey(publicKey string) (decodePublicKey *[PublicKeySize]byte, err error)

Decode public Key

func GenerateKey

func GenerateKey(ranbuf [32]byte) (publicKey *[PublicKeySize]byte, privateKey *[PrivateKeySize]byte, err error)

Generate Key

func GetEncAddress

func GetEncAddress(publicKey string) (address string, err error)

The public key gets the address

func GetEncPublicKey

func GetEncPublicKey(privateKey string) (publicKey string, err error)

The private key gets the public key

Types

This section is empty.

Jump to

Keyboard shortcuts

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