sign

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Utility for sign the param and validate sign & data

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sign

func Sign(param map[string]interface{}, signType string, loadPrivateFunc LoadPrivateKeyFunc) (sign string, err error)

Sign params

func ValidateSign

func ValidateSign(payload interface{}, loadPublicKey LoadPublicKeyFunc) (ok bool, err error)

Validate Notify Sign

func ValidateSignSync

func ValidateSignSync(data, sign string, loadPublicKey LoadPublicKeyFunc) (ok bool, err error)

Validate Response Sign

Types

type LoadPrivateKeyFunc

type LoadPrivateKeyFunc func() (publicKey *rsa.PrivateKey, err error)

type LoadPublicKeyFunc

type LoadPublicKeyFunc func() (publicKey *rsa.PublicKey, err error)

Jump to

Keyboard shortcuts

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