utils

package
v0.0.0-...-d67b91f Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToken

func CreateToken(ttl time.Duration, payload interface{}, privateKey string) (string, error)

func Decrypt

func Decrypt(keyString, encryptedString string) (decryptedString string)

func DecryptFile

func DecryptFile(keyString, encryptedPath, decryptedFilePath string) error

func Encrypt

func Encrypt(keyString, stringToEncrypt string) string

func EncryptFile

func EncryptFile(keyString, inputFilePath, outputFilePath string) error

func HashPassword

func HashPassword(password string) (string, error)

func SaveUploadedFile

func SaveUploadedFile(file *multipart.FileHeader, fileName, dst string) error

func ValidateToken

func ValidateToken(token, publicKey string) (interface{}, error)

func VerifyPassword

func VerifyPassword(hashedPassword, candidatePassword string) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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