eddsa

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: MIT Imports: 3 Imported by: 0

README

jwt-go-eddsa

Made by Textile Chat on Slack GitHub license Go Report Card GitHub action standard-readme compliant

EdDSA signing method for jwt-go

Table of Contents

Install

go get github.com/textileio/jwt-go-eddsa

Contributing

Pull requests and bug reports are very welcome ❤️

This repository falls under the Textile Code of Conduct.

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SigningMethodEd25519

type SigningMethodEd25519 struct {
	Name string
	Hash bool
}

SigningMethodEd25519 implements the Ed25519 signing method. Expects *crypto.Ed25519PublicKey for signing and *crypto.Ed25519PublicKey for validation. The signing method can be optionally configured to sign and validate the sha256 hash of the input string.

var SigningMethodEd25519Sha256 *SigningMethodEd25519

SigningMethodEd25519Sha is a non-standard, specific instance for Ed25519 with sha256 hashing enabled.

var SigningMethodEd25519i *SigningMethodEd25519

SigningMethodEd25519i is a specific instance for Ed25519.

func (*SigningMethodEd25519) Alg

func (m *SigningMethodEd25519) Alg() string

Alg returns the name of this signing method.

func (*SigningMethodEd25519) Sign

func (m *SigningMethodEd25519) Sign(signingString string, key interface{}) (string, error)

Sign implements the Sign method from SigningMethod. For this signing method, must be a *crypto.Ed25519PublicKey structure.

func (*SigningMethodEd25519) Verify

func (m *SigningMethodEd25519) Verify(signingString, signature string, key interface{}) error

Verify implements the Verify method from SigningMethod. For this signing method, must be a *crypto.Ed25519PublicKey structure.

Jump to

Keyboard shortcuts

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