simple encryption and decryption for golang
go get github.com/raitucarp/sed
package main
import (
"github.com/raitucarp/sed"
"fmt"
)
func main() {
key := "secret key"
txt := "is this works?"
e := sed.Encrypt(txt, key, sed.HEX)
d := sed.Decrypt(e, key, sed.HEX)
fmt.Println("byte comparison", []byte(d), []byte(txt))
fmt.Println("is this works?" == txt)
fmt.Println("encrypt =", e)
fmt.Println("decrypt =", d)
}
output is BASE32, BASE64 or HEX