1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-04-13 11:50:43 +02:00
sap-jenkins-library/cmd/readPipelineEnv_test.go
Valentin 93c4ea61aa
Revert "Fix deployment failure with CF if password contains special char (#5197)" (#5215)
This reverts commit 8205624a22920f2ebe1e7999bf1b384aeae04e5d.

Co-authored-by: Valentin Uchkunev <valentin.uchkunev@sap.com>
2024-12-23 12:33:12 +01:00

22 lines
417 B
Go

package cmd
import (
"strings"
"testing"
"github.com/stretchr/testify/assert"
)
func TestCpeEncryption(t *testing.T) {
secret := []byte("testKey!")
payload := []byte(strings.Repeat("testString", 100))
encrypted, err := encrypt(secret, payload)
assert.NoError(t, err)
assert.NotNil(t, encrypted)
decrypted, err := decrypt(secret, encrypted)
assert.NoError(t, err)
assert.Equal(t, decrypted, payload)
}