goext/cryptext/aes_test.go
2023-01-29 06:02:58 +01:00

23 lines
334 B
Go

package cryptext
import "testing"
func TestEncryptAESSimple(t *testing.T) {
pw := []byte("hunter12")
str1 := []byte("Hello World")
str2, err := EncryptAESSimple(pw, str1)
if err != nil {
panic(err)
}
str3, err := DecryptAESSimple(pw, str2)
if err != nil {
panic(err)
}
assertEqual(t, string(str1), string(str3))
}