Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeSecret ¶
func ComputeSecret(private *PrivateKey, peersPublic *PublicKey) (secret []byte)
生成密码
func MarshalPrivateKey ¶
func MarshalPrivateKey(key *PrivateKey) ([]byte, error)
Marshal PrivateKey to der
func MarshalPublicKey ¶
Marshal PublicKey to der
Types ¶
type PrivateKey ¶
私钥
func ParsePrivateKey ¶
func ParsePrivateKey(derBytes []byte) (*PrivateKey, error)
Parse PrivateKey der
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.