v0.0.66
This commit is contained in:
22
cryptext/aes_test.go
Normal file
22
cryptext/aes_test.go
Normal file
@@ -0,0 +1,22 @@
|
||||
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))
|
||||
}
|
Reference in New Issue
Block a user