signer

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const AlgHmacMD5 = "HMAC-MD5"
View Source
const AlgHmacSHA1 = "HMAC-SHA1"
View Source
const AlgHmacSHA256 = "HMAC-SHA256"

Variables

View Source
var ErrInvalidHashAlg = errors.New("invalid hash algorithm")
View Source
var ErrInvalidSignatureText = errors.New("invalid signature text")

Functions

This section is empty.

Types

type Signer

type Signer struct{}

Signer is for to sign request can access longbridge api

func (*Signer) Sign

func (s *Signer) Sign(ctx context.Context, secret []byte, req *http.Request, body []byte) (signature string, plain string, equal bool, err error)

Sign signature method of Longbridge OpenApi

func (*Signer) String

func (_ *Signer) String() string

Jump to

Keyboard shortcuts

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