security

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(key []byte, encodedText string) ([]byte, error)

Decrypt decrypts a byte-string `encodedText` using a given `key`

func Encrypt

func Encrypt(key, text []byte) (string, error)

Encrypt encrypts a byte-string `text` using a given `key`

func ValidBase64 added in v0.1.4

func ValidBase64(encoded string) bool

ValidBase64 checks if `encoded` is a valid base64 string

func ValidEmail added in v0.1.2

func ValidEmail(email string) bool

ValidEmail checks if `email` is a valid e-mail address

func ValidRandomString added in v0.1.2

func ValidRandomString(random string) bool

ValidRandomString checks if `random` is a valid random string

func ValidToken added in v0.1.2

func ValidToken(token string) bool

ValidToken checks if `token` is a valid token/random string

func ValidUUID added in v0.1.2

func ValidUUID(uuid string) bool

ValidUUID checks if `uuid` is a valid UUID-v4 string

Types

This section is empty.

Jump to

Keyboard shortcuts

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