Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) }
Click to show internal directories.
Click to hide internal directories.