encryption

package
v0.0.0-...-1aa968d Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const CHARS string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
View Source
const KEYLEN uint = 32

using aes256, so 32 bytes-long key

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(key, dataToDecrypt []byte) ([]byte, error)

Decrypts encrypted aes data with given key. https://www.melvinvivas.com/how-to-encrypt-and-decrypt-data-using-aes/ - very grateful to the author, THANK YOU.

func Encrypt

func Encrypt(key, dataToEncrypt []byte) ([]byte, error)

Encrypts given data using aes encryption. https://www.melvinvivas.com/how-to-encrypt-and-decrypt-data-using-aes/ - very grateful to the author, THANK YOU.

func Generate32AESkey

func Generate32AESkey() []byte

Generates 32 pseudo-random bytes to use as a key

Types

This section is empty.

Jump to

Keyboard shortcuts

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