ezaes

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: MIT Imports: 9 Imported by: 0

README

ezaes

Easy to use AES.

Install

go get gitlab.com/bdgo/ezaes

Example

pw := "secret"
input := "Hello"
fmt.Println(input)
ct, _ := Encrypt(pw, input)
fmt.Println(ct)
pt, _ := Decrypt(pw, ct)
fmt.Println(pt)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(password string, input string) (string, error)

Decrypt a string with a password

func DecryptWithKey

func DecryptWithKey(b64key, input string) (string, error)

DecryptWithKey will decrypt with a key

func Encrypt

func Encrypt(password string, input string) (string, error)

Encrypt a string using a password

func EncryptWithKey

func EncryptWithKey(b64key, input string) (string, error)

EncryptWithKey will encrypt a string with a specified key

func RandomKey

func RandomKey(size int) (string, error)

RandomKey will generate a random key

Types

This section is empty.

Jump to

Keyboard shortcuts

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