flutter_secure_storage icon indicating copy to clipboard operation
flutter_secure_storage copied to clipboard

Support for partial/header-only encryption, custom encrypted file storage, and caching behavior

Open ragavendranbala-TSL opened this issue 1 month ago • 0 comments

Hi, thanks for this awesome plugin!

My app downloads a lot of media files (videos, images, etc.) from the server. These files can be quite large (sometimes 100MB+). The plugin encrypts and decrypts them whenever they’re accessed.

I have a few concerns and questions:

  1. Performance concern: Full-file encryption/decryption of large files

Encrypting and decrypting very large files frequently may affect app performance. Is there an option for: • Header-only encryption, or • Partial encryption, or • Any hybrid approach that avoids decrypting the entire file every time?

This would help significantly reduce overhead.

  1. Saving encrypted files to a custom directory

Is it possible to save encrypted files to a specific path (e.g., app-specific directory, external storage, etc.) instead of the default path used by the plugin?

If yes, how can it be configured?

  1. Behavior when frequently accessing the same encrypted file

If the app repeatedly opens the same encrypted file: • Does the plugin internally cache decrypted content? • If a cache is created: • Where is it stored? • Is the path accessible? • Is there a way to control, clear, or disable this cache?

Understanding this will help us optimize memory usage and performance when dealing with repeated file access.

Additional context • Files are typically 50MB–200MB. • They might be accessed many times during a session. • I’m trying to avoid performance bottlenecks from repeated full decryption.

Thanks in advance! Looking forward to your guidance.

ragavendranbala-TSL avatar Nov 18 '25 09:11 ragavendranbala-TSL