ed25519

package
v0.0.0-...-fb2f31d Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKey

func GenerateKey() (publicKeyStr string, privateKeyStr string, err error)

GenerateKey 生成ed25519密钥对

func ParsePrivateKey

func ParsePrivateKey(data string) (privateKey ed25519.PrivateKey, err error)

ParsePrivateKey 解码秘钥

func ParsePublicKey

func ParsePublicKey(data string) (publicKey ed25519.PublicKey, err error)

ParsePublicKey 解码公钥

Types

type ED25519Signer

type ED25519Signer struct {
	// contains filtered or unexported fields
}

ED25519Signer ED25519签名工具

func (*ED25519Signer) Sign

func (signer *ED25519Signer) Sign(data []byte) (signatureB64 string, err error)

Sign 签名数据

type ED25519Verifier

type ED25519Verifier struct {
	// contains filtered or unexported fields
}

ED25519Verifier ED25519校验工具

func (*ED25519Verifier) Verify

func (verifier *ED25519Verifier) Verify(data []byte, signatureB64 string) (valid bool, err error)

Verify 验证签名

Jump to

Keyboard shortcuts

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