security

package
v3.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRandomSecret

func CreateRandomSecret() string

Creates a secret key compatible with the required by AES-256 algorithm.

func DecodeFromBase64

func DecodeFromBase64(encodedText []byte) ([]byte, error)

func DecryptAndDecode

func DecryptAndDecode(encryptedText []byte, key string) ([]byte, error)

Decrypts the provided content by using AES-256 and also decodes the content using std base64.

func DecryptFromAES256

func DecryptFromAES256(encryptedText []byte, key string) ([]byte, error)

func EncodeToBase64

func EncodeToBase64(text []byte) []byte

func EncryptAndEncode

func EncryptAndEncode(plainText []byte, key string) ([]byte, error)

Encrypts the provided content by using AES-256 and also encodes the content using std base64.

func EncryptToAES256

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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