ecdh

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

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EcdhGenerateKey

func EcdhGenerateKey(rand io.Reader, curve elliptic.Curve) (*ecdsa.PrivateKey, error)

EcdhGenerateKey 生成ECDH密钥对

func EcdhSharedKey

func EcdhSharedKey(privateKey *ecdsa.PrivateKey, publicKey *ecdsa.PublicKey) ([]byte, error)

EcdhSharedKey 计算ECDH共享密钥

func EcdhSharedKeyByString

func EcdhSharedKeyByString(client, server string) ([]byte, error)

计算共享密钥

func LoadPrivateKeyFromFile

func LoadPrivateKeyFromFile(filepath string) (*ecdsa.PrivateKey, error)

func LoadPublicKeyFromFile

func LoadPublicKeyFromFile(filepath string) (*ecdsa.PublicKey, error)

func LoadString2PrivateKey

func LoadString2PrivateKey(pemData string) (*ecdsa.PrivateKey, error)

func LoadString2PublicKey

func LoadString2PublicKey(pemData string) (*ecdsa.PublicKey, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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