utils

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const PrivateKeyPath = "key.rsa"
View Source
const PublicKeyPath = "key.rsa.pub"

Variables

This section is empty.

Functions

func ExtractResponseData added in v0.3.0

func ExtractResponseData(res *http.Response) ([]byte, error)

func LPad added in v0.3.0

func LPad(text string, n int, char string) string

func RPad added in v0.3.0

func RPad(text string, n int, char string) string

func ReadFile

func ReadFile(path string) ([]byte, error)

func SHA1Encode added in v0.3.0

func SHA1Encode(val []byte) []byte

func WriteFile

func WriteFile(path string, content []byte) error

Types

type Keys added in v0.3.0

type Keys struct {
	PrivateKey []byte
	PublicKey  []byte
}

func GenerateKeys added in v0.3.0

func GenerateKeys() (Keys, error)

Jump to

Keyboard shortcuts

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