mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
19 lines
425 B
Go
19 lines
425 B
Go
package crypto
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
//TODO: refactor test style
|
|
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)
|
|
}
|