ecc

package
v0.0.0-...-3f120a3 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKey

func GenerateKey() (publicKeyStr string, privateKeyStr 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

type ECCDecoder

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

ECCDecoder ECC解密工具

func (*ECCDecoder) Decrypt

func (decoder *ECCDecoder) Decrypt(ctB64 string) (pt []byte, err error)

Decrypt ECC解密

type ECCEncoder

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

ECCEncoder ECC加密工具

func (*ECCEncoder) Encrypt

func (encoder *ECCEncoder) Encrypt(pt []byte) (ctB64 string, err error)

Encrypt ECC加密

Jump to

Keyboard shortcuts

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