package aes import ( "crypto/sha256" goaes "github.com/syronz/goAES" ) func EncryptAES(password string, plaintext string) string { iv := sha256.Sum256([]byte(password)) aes, _ := goaes.New().Key(password).IV(string(iv[:16])).Build() return aes.Encrypt(plaintext) } func DecryptAES(password string, ct string) string { iv := sha256.Sum256([]byte(password)) aes, _ := goaes.New().Key(password).IV(string(iv[:16])).Build() return aes.Decrypt(ct) }