Documentation ¶
Index ¶
- Variables
- func ComputeSecret(private *PrivateKey, peersPublic *PublicKey) (secret []byte)
- func GenerateKey(curve elliptic.Curve, rand io.Reader) (*PrivateKey, *PublicKey, error)
- func MarshalPrivateKey(key *PrivateKey) ([]byte, error)
- func MarshalPublicKey(key *PublicKey) ([]byte, error)
- type Curve
- type PrivateKey
- type PublicKey
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ComputeSecret ¶
func ComputeSecret(private *PrivateKey, peersPublic *PublicKey) (secret []byte)
生成密码
func GenerateKey ¶
生成密钥对
Types ¶
type PrivateKey ¶
私钥
func (*PrivateKey) ComputeSecret ¶
func (this *PrivateKey) ComputeSecret(peersPublic *PublicKey) (secret []byte)
生成密码
func (*PrivateKey) Public ¶
func (this *PrivateKey) Public() crypto.PublicKey
Click to show internal directories.
Click to hide internal directories.