security

package
v1.1.13 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64Decode

func Base64Decode(str string) string

func Base64Encode

func Base64Encode(data string) string

func Base64EncodeRaw

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

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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