mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
17 lines
378 B
Go
17 lines
378 B
Go
package utils
|
|
|
|
import (
|
|
"github.com/stretchr/testify/require"
|
|
"testing"
|
|
)
|
|
|
|
func TestEncryptAesPassword(t *testing.T) {
|
|
plainText := "crawlab"
|
|
encryptedText, err := EncryptAES(plainText)
|
|
require.Nil(t, err)
|
|
decryptedText, err := DecryptAES(encryptedText)
|
|
require.Nil(t, err)
|
|
require.Equal(t, decryptedText, plainText)
|
|
require.NotEqual(t, decryptedText, encryptedText)
|
|
}
|