MCPcopy Create free account
hub / github.com/authorizerdev/authorizer / TestEncryptDecryptAES_LongKey

Function TestEncryptDecryptAES_LongKey

internal/crypto/aes_test.go:85–95  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

83}
84
85func TestEncryptDecryptAES_LongKey(t *testing.T) {
86 key := strings.Repeat("a", 100)
87 plaintext := "test data"
88
89 encrypted, err := EncryptAES(key, plaintext)
90 require.NoError(t, err)
91
92 decrypted, err := DecryptAES(key, encrypted)
93 require.NoError(t, err)
94 assert.Equal(t, plaintext, decrypted)
95}

Callers

nothing calls this directly

Calls 2

EncryptAESFunction · 0.85
DecryptAESFunction · 0.85

Tested by

no test coverage detected