MCPcopy Create free account
hub / github.com/Driver-C/tryssh / TestEncryptDecrypt_EmptyString

Function TestEncryptDecrypt_EmptyString

pkg/utils/crypto_test.go:28–38  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

26}
27
28func TestEncryptDecrypt_EmptyString(t *testing.T) {
29 key := make([]byte, 32)
30
31 encrypted, err := Encrypt("", key)
32 assert.NoError(t, err)
33 assert.Equal(t, "", encrypted)
34
35 decrypted, err := Decrypt("", key)
36 assert.NoError(t, err)
37 assert.Equal(t, "", decrypted)
38}
39
40func TestDecrypt_PlaintextPassthrough(t *testing.T) {
41 key := make([]byte, 32)

Callers

nothing calls this directly

Calls 2

EncryptFunction · 0.85
DecryptFunction · 0.85

Tested by

no test coverage detected