Documentation ¶
Index ¶
- func EcdhGenerateKey(rand io.Reader, curve elliptic.Curve) (*ecdsa.PrivateKey, error)
- func EcdhSharedKey(privateKey *ecdsa.PrivateKey, publicKey *ecdsa.PublicKey) ([]byte, error)
- func EcdhSharedKeyByString(client, server string) ([]byte, error)
- func LoadPrivateKeyFromFile(filepath string) (*ecdsa.PrivateKey, error)
- func LoadPublicKeyFromFile(filepath string) (*ecdsa.PublicKey, error)
- func LoadString2PrivateKey(pemData string) (*ecdsa.PrivateKey, error)
- func LoadString2PublicKey(pemData string) (*ecdsa.PublicKey, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EcdhGenerateKey ¶
EcdhGenerateKey 生成ECDH密钥对
func EcdhSharedKey ¶
EcdhSharedKey 计算ECDH共享密钥
func EcdhSharedKeyByString ¶
计算共享密钥
func LoadPrivateKeyFromFile ¶
func LoadPrivateKeyFromFile(filepath string) (*ecdsa.PrivateKey, error)
func LoadString2PrivateKey ¶
func LoadString2PrivateKey(pemData string) (*ecdsa.PrivateKey, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.