Skip to content

Improve cache key correctness and collision resistance #242

Description

@Aditya8369

Description: The cache key includes input, key, and options (minus non-serializable signal/bypassCache). Large inputs/keys create huge JSON strings and increase memory usage. Also, using raw plaintext as part of the key can be inefficient.
Files: lib/hooks/useCipherWorker.ts
Proposed enhancement: Use a hashing strategy (e.g., stable hash of input+key+options) for the cache key instead of full JSON.stringify of large strings. Keep the LRU cache but store hashed keys and cap total memory usage.

Metadata

Metadata

Assignees

Labels

ECSoC26Elite Coders Summer of Code 2026

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions