security

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SignBase64Txn

func SignBase64Txn(secretKey string, base64Txn string, networkPassPhrase string) (string, error)

SignBase64Txn signs the transaction hash from base64Txn string using the secret key

func SignHttp

func SignHttp(fullPathWithQuery string, body string, secretKey string) (string, error)

SignHttp returns a signed base64 encoded string of fullPathWithQuery+body

func SignString

func SignString(toSign string, secretKey string) (string, error)

SignString returns a signed base64 encoded string of toSign

func VerifyHttpSignature

func VerifyHttpSignature(fullPathWithQuery string, body string, base64Signature string, publicKey string) error

VerifyHttpSignature verifies the httpRequest signation retrieved from X-BANTUPAY-SIGNATURE header

func VerifySignatureString

func VerifySignatureString(toSign string, base64Signature string, publicKey string) error

VerifySignatureString verifies if the signatures match with the one to eb generated from toSign

Types

This section is empty.

Jump to

Keyboard shortcuts

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