Home / Function/ Test_DecryptCookie_InvalidEncryptedValue() — fiber Function Reference

Test_DecryptCookie_InvalidEncryptedValue() — fiber Function Reference

Architecture documentation for the Test_DecryptCookie_InvalidEncryptedValue() function in encryptcookie_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  1c134fa1_6c74_fa4f_9ea0_b7ad9227e811["Test_DecryptCookie_InvalidEncryptedValue()"]
  ac3bbef3_a1d3_d68b_64fb_619088dde10d["encryptcookie_test.go"]
  1c134fa1_6c74_fa4f_9ea0_b7ad9227e811 -->|defined in| ac3bbef3_a1d3_d68b_64fb_619088dde10d
  style 1c134fa1_6c74_fa4f_9ea0_b7ad9227e811 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

middleware/encryptcookie/encryptcookie_test.go lines 100–109

func Test_DecryptCookie_InvalidEncryptedValue(t *testing.T) {
	t.Parallel()

	key := GenerateKey(32)
	// the decoded value is shorter than the GCM nonce size, so decryption should fail immediately
	shortValue := base64.StdEncoding.EncodeToString([]byte("short"))

	_, err := DecryptCookie("session", shortValue, key)
	require.ErrorIs(t, err, ErrInvalidEncryptedValue)
}

Domain

Subdomains

Frequently Asked Questions

What does Test_DecryptCookie_InvalidEncryptedValue() do?
Test_DecryptCookie_InvalidEncryptedValue() is a function in the fiber codebase, defined in middleware/encryptcookie/encryptcookie_test.go.
Where is Test_DecryptCookie_InvalidEncryptedValue() defined?
Test_DecryptCookie_InvalidEncryptedValue() is defined in middleware/encryptcookie/encryptcookie_test.go at line 100.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free