p256

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrivKeyAminoName = "amo/PrivKeyP256"
	PubKeyAminoName  = "amo/PubKeyP256"
	SignatureSize    = 64
	PrivKeyP256Size  = 32
	PubKeyP256Size   = 65
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PrivKeyP256

type PrivKeyP256 [PrivKeyP256Size]byte

func GenPrivKey

func GenPrivKey() PrivKeyP256

func GenPrivKeyFromSecret

func GenPrivKeyFromSecret(secret []byte) PrivKeyP256

func (PrivKeyP256) Bytes

func (privKey PrivKeyP256) Bytes() []byte

func (PrivKeyP256) Equals

func (privKey PrivKeyP256) Equals(other tmc.PrivKey) bool

func (PrivKeyP256) MarshalJSON

func (privKey PrivKeyP256) MarshalJSON() ([]byte, error)

func (PrivKeyP256) PubKey

func (privKey PrivKeyP256) PubKey() tmc.PubKey

func (*PrivKeyP256) SetBytes

func (privKey *PrivKeyP256) SetBytes(buf []byte)

func (PrivKeyP256) Sign

func (privKey PrivKeyP256) Sign(msg []byte) ([]byte, error)

func (PrivKeyP256) String

func (privKey PrivKeyP256) String() string

func (PrivKeyP256) ToECDSA

func (privKey PrivKeyP256) ToECDSA() *ecdsa.PrivateKey

func (*PrivKeyP256) UnmarshalJSON

func (privKey *PrivKeyP256) UnmarshalJSON(data []byte) error

type PubKeyP256

type PubKeyP256 [PubKeyP256Size]byte

func (PubKeyP256) Address

func (pubKey PubKeyP256) Address() tmc.Address

func (PubKeyP256) Bytes

func (pubKey PubKeyP256) Bytes() []byte

func (PubKeyP256) Equals

func (pubKey PubKeyP256) Equals(other tmc.PubKey) bool

func (PubKeyP256) MarshalJSON

func (pubKey PubKeyP256) MarshalJSON() ([]byte, error)

func (PubKeyP256) String

func (pubKey PubKeyP256) String() string

func (PubKeyP256) ToECDSA

func (pubKey PubKeyP256) ToECDSA() *ecdsa.PublicKey

func (*PubKeyP256) UnmarshalJSON

func (pubKey *PubKeyP256) UnmarshalJSON(data []byte) error

func (PubKeyP256) VerifyBytes

func (pubKey PubKeyP256) VerifyBytes(msg []byte, sig []byte) (res bool)

Jump to

Keyboard shortcuts

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