Test_EncryptCookie_Rejects_Swapped_Names() — fiber Function Reference
Architecture documentation for the Test_EncryptCookie_Rejects_Swapped_Names() function in encryptcookie_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD ef97c26e_7ef2_286d_4959_074524d3cff0["Test_EncryptCookie_Rejects_Swapped_Names()"] ac3bbef3_a1d3_d68b_64fb_619088dde10d["encryptcookie_test.go"] ef97c26e_7ef2_286d_4959_074524d3cff0 -->|defined in| ac3bbef3_a1d3_d68b_64fb_619088dde10d style ef97c26e_7ef2_286d_4959_074524d3cff0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/encryptcookie/encryptcookie_test.go lines 251–265
func Test_EncryptCookie_Rejects_Swapped_Names(t *testing.T) {
t.Parallel()
testKey := GenerateKey(32)
encryptedValue, err := EncryptCookie("cookieA", "ValueA", testKey)
require.NoError(t, err)
decryptedValue, err := DecryptCookie("cookieA", encryptedValue, testKey)
require.NoError(t, err)
require.Equal(t, "ValueA", decryptedValue)
_, err = DecryptCookie("cookieB", encryptedValue, testKey)
require.Error(t, err)
require.ErrorContains(t, err, "failed to decrypt ciphertext")
}
Domain
Subdomains
Source
Frequently Asked Questions
What does Test_EncryptCookie_Rejects_Swapped_Names() do?
Test_EncryptCookie_Rejects_Swapped_Names() is a function in the fiber codebase, defined in middleware/encryptcookie/encryptcookie_test.go.
Where is Test_EncryptCookie_Rejects_Swapped_Names() defined?
Test_EncryptCookie_Rejects_Swapped_Names() is defined in middleware/encryptcookie/encryptcookie_test.go at line 251.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free