signer

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeySkDefault = "secret_key"

	AlgorithmMd5    = "md5"
	AlgorithmSha256 = "sha256"
)

Variables

This section is empty.

Functions

func FormatURLParam

func FormatURLParam(body map[string]any) (urlParam string)

Types

type Algorithm

type Algorithm string

type Client

type Client struct {
	KeySK     string
	Algorithm Algorithm
}

func New

func New() (client *Client)

New default tls.Config{InsecureSkipVerify: true}

func (*Client) SetAlgorithm

func (c *Client) SetAlgorithm(data Algorithm) (client *Client)

func (*Client) SetKeySK

func (c *Client) SetKeySK(data string) (client *Client)

func (*Client) Sign

func (c *Client) Sign(params map[string]any, sk string) (sign string)

func (*Client) VerifySign

func (c *Client) VerifySign(params map[string]any, secretKey string, sign string) bool

Jump to

Keyboard shortcuts

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