security

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSlashes added in v1.1.22

func AddSlashes(str string) string

func Base64Decode

func Base64Decode(str string) string

func Base64Encode

func Base64Encode(data string) string

func Base64EncodeRaw added in v1.1.3

func Base64EncodeRaw(data []byte) string

func DecryptText

func DecryptText(ciphertext, key []byte) ([]byte, error)

DecryptText method will decrypt the text with help of a key Ref: https://tutorialedge.net/golang/go-encrypt-decrypt-aes-tutorial/

func EncryptText

func EncryptText(text, key []byte) ([]byte, error)

EncryptText method will encrypt the text using the key provided with AES algo. Ref: https://tutorialedge.net/golang/go-encrypt-decrypt-aes-tutorial/

func HashStr

func HashStr(value string) uint32

HashStr method will hash the string to int32 value

func MD5

func MD5(data []byte) string

func MakeTrackSecret

func MakeTrackSecret(message string) string

func RandomInt

func RandomInt(min, max int) int

func RandomString

func RandomString(n int) string

func Sha256

func Sha256(message []byte) string

func Sha256Hmac added in v1.1.3

func Sha256Hmac(message, key []byte) []byte

func Sha512Hash added in v1.1.11

func Sha512Hash(value string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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