ecdsa

package
v0.0.0-...-2bfd647 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKey

func GenerateKey(priFileName, pubFileName string, curve elliptic.Curve) error

func LoadEcdsaKey

func LoadEcdsaKey(privPemFile, pubPemFile string) (*ecdsa.PrivateKey, *ecdsa.PublicKey, error)

LoadEcdsaKey load privat key and public key

Types

type Ecdsa

type Ecdsa struct {
	// contains filtered or unexported fields
}

func NewEcdsa

func NewEcdsa(pubPemFile, priPemFile string, hashType crypto.Hash) (*Ecdsa, error)

func (*Ecdsa) ECCDecript

func (e *Ecdsa) ECCDecript(src []byte) (dst []byte, err error)

解密,只支持P256

func (*Ecdsa) ECCEncript

func (e *Ecdsa) ECCEncript(src []byte) (dst []byte, err error)

加密,只支持P256

func (*Ecdsa) ECCSign

func (e *Ecdsa) ECCSign(src []byte) (dst []byte, err error)

func (*Ecdsa) ECCVerify

func (e *Ecdsa) ECCVerify(src []byte, sig []byte) (err error)

Jump to

Keyboard shortcuts

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