ecc

package
v0.0.0-...-150877d Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(privateKey *ecdsa.PrivateKey, ctB64 string) ([]byte, error)

Decrypt ECC解密

func Encrypt

func Encrypt(publicKey *ecdsa.PublicKey, pt []byte) (string, error)

Encrypt ECC加密

func GenerateKey

func GenerateKey() (privateKeyStr string, publicKeyStr string, err error)

GenerateKey 生成ECC公钥/秘钥对

func ParsePrivateKey

func ParsePrivateKey(data string) (privateKey *ecdsa.PrivateKey, err error)

ParsePrivateKey 解码秘钥

func ParsePublicKey

func ParsePublicKey(data string) (publicKey *ecdsa.PublicKey, err error)

ParsePublicKey 解码共钥

Types

This section is empty.

Jump to

Keyboard shortcuts

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