signature

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: GPL-3.0 Imports: 15 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertSimpleJSONToString added in v0.1.6

func ConvertSimpleJSONToString(js *simplejson.Json) (string, error)

Types

type PublicKey

type PublicKey string

type SecretKey

type SecretKey string

type Sign

type Sign interface {
	CreateSignature(queryString string) string
	SignParameters(params *simplejson.Json) (*simplejson.Json, error)
	ValidateSignatureParams(params *simplejson.Json) bool
	ValidateSignature(string, string) bool
	GetAPIKey() string
}

type SignEd25519

type SignEd25519 struct {
	// contains filtered or unexported fields
}

func NewSignEd25519

func NewSignEd25519(apiKey string, publicKey string, privateKey string) (signer *SignEd25519, err error)

func (*SignEd25519) CreateSignature

func (sign *SignEd25519) CreateSignature(queryString string) string

Функція для створення підпису Ed25519

func (*SignEd25519) GetAPIKey

func (sign *SignEd25519) GetAPIKey() string

func (*SignEd25519) SignParameters

func (sign *SignEd25519) SignParameters(params *simplejson.Json) (*simplejson.Json, error)

func (*SignEd25519) ValidateSignature added in v0.1.2

func (sign *SignEd25519) ValidateSignature(message, signature string) bool

func (*SignEd25519) ValidateSignatureParams added in v0.1.3

func (sign *SignEd25519) ValidateSignatureParams(params *simplejson.Json) bool

Функція для валідації підпису

type SignHMAC

type SignHMAC struct {
	// contains filtered or unexported fields
}

func NewSignHMAC

func NewSignHMAC(apiKey PublicKey, apiSecret SecretKey) *SignHMAC

func (*SignHMAC) CreateSignature

func (sign *SignHMAC) CreateSignature(queryString string) string

Функція для створення підпису

func (*SignHMAC) GetAPIKey

func (sign *SignHMAC) GetAPIKey() string

func (*SignHMAC) SignParameters

func (sign *SignHMAC) SignParameters(params *simplejson.Json) (*simplejson.Json, error)

func (*SignHMAC) ValidateSignature added in v0.1.2

func (sign *SignHMAC) ValidateSignature(message, signature string) bool

func (*SignHMAC) ValidateSignatureParams added in v0.1.3

func (sign *SignHMAC) ValidateSignatureParams(params *simplejson.Json) (result bool)

type SignRSA

type SignRSA struct {
	// contains filtered or unexported fields
}

func NewSignRSA

func NewSignRSA(apiKey string, publicKey string, privateKey string) (sign *SignRSA, err error)

func (*SignRSA) CreateSignature

func (sign *SignRSA) CreateSignature(queryString string) string

Функція для створення підпису RSA

func (*SignRSA) GetAPIKey

func (sign *SignRSA) GetAPIKey() string

func (*SignRSA) SignParameters

func (sign *SignRSA) SignParameters(params *simplejson.Json) (*simplejson.Json, error)

func (*SignRSA) ValidateSignature added in v0.1.2

func (sign *SignRSA) ValidateSignature(message, signature string) bool

func (*SignRSA) ValidateSignatureParams added in v0.1.3

func (sign *SignRSA) ValidateSignatureParams(params *simplejson.Json) bool

Функція для валідації підпису

Jump to

Keyboard shortcuts

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