Documentation ¶
Index ¶
- func ComputeSecret(private *PrivateKey, peersPublic *PublicKey) []byte
- func GenerateKey(groupID GroupID, rand io.Reader) (*PrivateKey, *PublicKey, error)
- func GenerateKeyWithGroup(param *Group, rand io.Reader) (*PrivateKey, *PublicKey, error)
- func IsSafePrimeParameters(param Parameters, n int) bool
- func MarshalPrivateKey(key *PrivateKey) ([]byte, error)
- func MarshalPublicKey(key *PublicKey) ([]byte, error)
- type Group
- type GroupID
- type Parameters
- type PrivateKey
- type PublicKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKey ¶
生成证书
func GenerateKeyWithGroup ¶
生成证书
Types ¶
type Parameters ¶
公用参数
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.