alg

package
v0.0.0-...-a2093d6 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2022 License: LGPL-2.1 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HSA256

func HSA256() *hsa256

func RegisterAlg

func RegisterAlg(algorithm Algorithm)

Types

type Algorithm

type Algorithm interface {
	// Name The name of the algorithm
	Name() string
	// Encrypt Only pay attention to how to encrypt, return the encrypted original Signature data.
	// Don't do encoding processing; signing is a string that connects the header and the payload after encoding through the point ".".
	// 只关注如何加密, 返回加密后的原始Signature数据, 不要做编码处理; signing为将header和payload编码后的通过点连接起来的字符串.
	Encrypt(signing, secret string) ([]byte, error)
}

func GetAlg

func GetAlg(name string) Algorithm

Jump to

Keyboard shortcuts

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