mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-09 17:53:41 +00:00
18 lines
397 B
Go
18 lines
397 B
Go
|
package crypto
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func TestDecrypt_OK(t *testing.T) {
|
||
|
encryptedpw, err := EncryptAESString("ThisIsMySecretPw", "passphrasewhichneedstobe32bytes!")
|
||
|
assert.NoError(t, err)
|
||
|
|
||
|
decryptedpw, err := DecryptAESString(encryptedpw, "passphrasewhichneedstobe32bytes!")
|
||
|
assert.NoError(t, err)
|
||
|
|
||
|
assert.Equal(t, "ThisIsMySecretPw", decryptedpw)
|
||
|
}
|