MCPcopy Create free account
hub / github.com/devspace-sh/devspace / TestPadKey

Function TestPadKey

pkg/util/encryption/util_test.go:9–13  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestPadKey(t *testing.T) {
10 assert.Equal(t, "12345678901234567890123456789012", string(PadKey([]byte("12345678901234567890123456789012"))), "PadKey of length 32 isn't equal to original key")
11 assert.Equal(t, "12345678901234567890123456789012", string(PadKey([]byte("123456789012345678901234567890123"))), "PadKey of length 33 isn't a shortened version of original key")
12 assert.Equal(t, "1234567890123456789012345678901 ", string(PadKey([]byte("1234567890123456789012345678901"))), "PadKey of length 31 isn't an extended version of original key")
13}
14
15func TestEncryptDecryptAES(t *testing.T) {
16 encrypted, err := EncryptAES([]byte("12345678901234567890123456789012"), []byte("Hello World"))

Callers

nothing calls this directly

Calls 2

PadKeyFunction · 0.85
EqualMethod · 0.80

Tested by

no test coverage detected