ed25519

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrED25519Verification = errors.New("crypto/ed25519: verification error")

ErrED25519Verification is missing from crypto/ed25519 compared to crypto/rsa

View Source
var (
	// SigningMethodED25519 implements ED25519.
	SigningMethodED25519 = &signingMethodED25519{
		Name: "Ed25519",
		Hash: crypto.SHA512,
	}
)

Specific instances of EC SigningMethods.

Functions

func GenerateKey

func GenerateKey() (publicKey, privateKey string)

GenerateKey generates a public/private key pair using entropy from rand. the keys is encoded by base64.RawURLEncoding

func KeyPairFrom

func KeyPairFrom(publicKey string, privateKey ...string) (authJwt.KeyPair, error)

KeyPairFrom converts key encoded by base64.RawURLEncoding to KeyPair. privateKey is used for sign, publicKey is used for verify. if privateKey omits, sign method can't be used.

Types

This section is empty.

Jump to

Keyboard shortcuts

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