Documentation ¶
Index ¶
- Constants
- func FormatSignatureContent(params map[string]interface{}, configures ...SigningOption) string
- func FormatSignatureContentEx(payload interface{}, configures ...SigningOption) string
- func GeneratePayloadMappingData(value reflect.Value, parentTagName string) map[string]interface{}
- func GenerateSignatureDataHmacMD5(appKey string, params map[string]interface{}, configures ...SigningOption) string
- func GenerateSignatureDataHmacMD5Ex(appKey string, payload interface{}, configures ...SigningOption) string
- func GenerateSignatureDataHmacSHA1(appKey string, params map[string]interface{}, configures ...SigningOption) string
- func GenerateSignatureDataHmacSHA1Ex(appKey string, payload interface{}, configures ...SigningOption) string
- func GenerateSignatureDataMd5(appKey string, params map[string]interface{}, configures ...SigningOption) string
- func GenerateSignatureDataMd5Ex(appKey string, payload interface{}, configures ...SigningOption) string
- func GenerateSignatureDataSHA1(appKey string, params map[string]interface{}, configures ...SigningOption) string
- func VerifySignatureDataHmacMD5(signValue string, appKey string, params map[string]interface{}, ...) bool
- func VerifySignatureDataHmacSHA1(signValue string, appKey string, params map[string]interface{}, ...) bool
- func VerifySignatureDataMd5(signValue string, appKey string, params map[string]interface{}, ...) bool
- func VerifySignatureDataRSA(pubKey *rsa.PublicKey, hash crypto.Hash, params map[string]interface{}, ...) error
- func VerifySignatureDataRSAEx(pubKey *rsa.PublicKey, hash crypto.Hash, content string, sign []byte) error
- func VerifySignatureDataSHA1(signValue string, appKey string, params map[string]interface{}, ...) bool
- type SignFieldsSortType
- type SigningOption
Constants ¶
const ( SignFieldsSortNone = SignFieldsSortType(0) SignFieldsSortAsc = SignFieldsSortType(1) SignFieldsSortDesc = SignFieldsSortType(-1) SignFieldsFormattingModeDefault = 0 DefaultSignatureField = "sign" SerializingTypeJSON = "json" SerializingTypeXML = "xml" )
Consts
Variables ¶
This section is empty.
Functions ¶
func FormatSignatureContent ¶
func FormatSignatureContent(params map[string]interface{}, configures ...SigningOption) string
FormatSignatureContent formatting content
func FormatSignatureContentEx ¶
func FormatSignatureContentEx(payload interface{}, configures ...SigningOption) string
FormatSignatureContentEx formatting content
func GeneratePayloadMappingData ¶
GeneratePayloadMappingData generates payload data
func GenerateSignatureDataHmacMD5 ¶
func GenerateSignatureDataHmacMD5(appKey string, params map[string]interface{}, configures ...SigningOption) string
GenerateSignatureDataHmacMD5 MD5
func GenerateSignatureDataHmacMD5Ex ¶
func GenerateSignatureDataHmacMD5Ex(appKey string, payload interface{}, configures ...SigningOption) string
GenerateSignatureDataHmacMD5Ex MD5
func GenerateSignatureDataHmacSHA1 ¶
func GenerateSignatureDataHmacSHA1(appKey string, params map[string]interface{}, configures ...SigningOption) string
GenerateSignatureDataHmacSHA1 SHA1
func GenerateSignatureDataHmacSHA1Ex ¶
func GenerateSignatureDataHmacSHA1Ex(appKey string, payload interface{}, configures ...SigningOption) string
GenerateSignatureDataHmacSHA1Ex SHA1
func GenerateSignatureDataMd5 ¶
func GenerateSignatureDataMd5(appKey string, params map[string]interface{}, configures ...SigningOption) string
GenerateSignatureDataMd5 MD5
func GenerateSignatureDataMd5Ex ¶
func GenerateSignatureDataMd5Ex(appKey string, payload interface{}, configures ...SigningOption) string
GenerateSignatureDataMd5Ex MD5
func GenerateSignatureDataSHA1 ¶
func GenerateSignatureDataSHA1(appKey string, params map[string]interface{}, configures ...SigningOption) string
GenerateSignatureDataSHA1 SHA1
func VerifySignatureDataHmacMD5 ¶
func VerifySignatureDataHmacMD5(signValue string, appKey string, params map[string]interface{}, configures ...SigningOption) bool
VerifySignatureDataHmacMD5 MD5
func VerifySignatureDataHmacSHA1 ¶
func VerifySignatureDataHmacSHA1(signValue string, appKey string, params map[string]interface{}, configures ...SigningOption) bool
VerifySignatureDataHmacSHA1 SHA1
func VerifySignatureDataMd5 ¶
func VerifySignatureDataMd5(signValue string, appKey string, params map[string]interface{}, configures ...SigningOption) bool
VerifySignatureDataMd5 MD5
func VerifySignatureDataRSA ¶
func VerifySignatureDataRSA(pubKey *rsa.PublicKey, hash crypto.Hash, params map[string]interface{}, sign string, configures ...SigningOption) error
VerifySignatureDataRSA RSA
func VerifySignatureDataRSAEx ¶
func VerifySignatureDataRSAEx(pubKey *rsa.PublicKey, hash crypto.Hash, content string, sign []byte) error
VerifySignatureDataRSAEx RSA
func VerifySignatureDataSHA1 ¶
func VerifySignatureDataSHA1(signValue string, appKey string, params map[string]interface{}, configures ...SigningOption) bool
VerifySignatureDataSHA1 SHA1
Types ¶
type SignFieldsSortType ¶
type SignFieldsSortType int
SignFieldsSortType signature fields sorting type
type SigningOption ¶
type SigningOption interface {
// contains filtered or unexported methods
}
SigningOption customizing options
func WithSignatureField ¶
func WithSignatureField(field string) SigningOption
WithSignatureField option
func WithSignaturingFields ¶
func WithSignaturingFields(fields []string) SigningOption
WithSignaturingFields option
func WithSkipEmptyField ¶
func WithSkipEmptyField(skip bool) SigningOption
WithSkipEmptyField option
func WithSkipSignaturingField ¶
func WithSkipSignaturingField(key string) SigningOption
WithSkipSignaturingField option
func WithSortedFields ¶
func WithSortedFields(sortType SignFieldsSortType) SigningOption
WithSortedFields option