algorithm

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Algorithm

type Algorithm string
const (
	HS256 Algorithm = "HS256"
	HS384 Algorithm = "HS384"
	HS512 Algorithm = "HS512"
	RS256 Algorithm = "RS256"
	RS384 Algorithm = "RS384"
	RS512 Algorithm = "RS512"
	ES256 Algorithm = "ES256"
	ES384 Algorithm = "ES384"
	ES512 Algorithm = "ES512"
	PS256 Algorithm = "PS256"
	PS384 Algorithm = "PS384"
	PS512 Algorithm = "PS512"
)

type SignatureAlgorithm

type SignatureAlgorithm interface {
	// GenerateKeyPair generates public and private key
	GenerateKeyPair() (*keypair.KeyPair, error)

	// GenerateSecret is used to generating a secret
	GenerateSecret() ([]byte, error)
}

SignatureAlgorithm is a collection of all signature algorithm and it provides some basic method to use

func GetSignatureAlgorithm

func GetSignatureAlgorithm(algorithm Algorithm) (SignatureAlgorithm, error)

Jump to

Keyboard shortcuts

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