curve25519

package
v1.0.1019 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ecdh25519

type Ecdh25519 struct{}

Ecdh25519

func New

func New() Ecdh25519

构造函数

func (Ecdh25519) Check

func (this Ecdh25519) Check(peersPublic PublicKey) (err error)

检测

func (Ecdh25519) ComputeSecret

func (this Ecdh25519) ComputeSecret(private PrivateKey, peersPublic PublicKey) (secret []byte)

生成密码

func (Ecdh25519) GenerateKey

func (this Ecdh25519) GenerateKey(rand io.Reader) (private PrivateKey, public PublicKey, err error)

生成密钥对

func (Ecdh25519) PublicKey

func (this Ecdh25519) PublicKey(private PrivateKey) (public PublicKey)

生成公钥

type PrivateKey

type PrivateKey []byte

私钥

type PublicKey

type PublicKey []byte

公钥

Jump to

Keyboard shortcuts

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