An implementation for flutter secure file storage

Overview

Flutter secure file storage

pub package

An implementation for flutter secure file storage. For example keychain has a soft limit of 4kb. Using the file system instead we can store much larger content.

AES/GCM/NoPadding encryption is used to encrypt the data. The keys are generated using Random.secureand stored using the flutter_secure_storage package, the values are encrypted by the pointycastle package or native for Android

Usage

It's implemented to use the same structure as FlutterSecureStorage and therefore you can switch easily between them. But we also support Uint8List as input/output

import 'package:flutter_secure_file_storage/flutter_secure_file_storage.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';

// Create storage
final storage = FlutterSecureFileStorage(FlutterSecureStorage());

// Read value
final value = await storage.read<String>(key: key);

// Read all values
Map<String, String> allValues = await storage.readAll();

// Delete value
await storage.delete(key: key);

// Delete all
await storage.deleteAll();

// Write value
await storage.write(key: key, value: value);

Configure Android version

In [project]/android/app/build.gradle set minSdkVersion to >= 18.

android {
    ...

    defaultConfig {
        ...
        minSdkVersion 18
        ...
    }

}
Comments
  • Mismatch in encoding and decoding of String

    Mismatch in encoding and decoding of String

    The code found in: https://github.com/icapps/flutter_secure_file_storage/blob/d0317a33cf51faeaf00fd465df934341979b52f1/lib/src/encryption_util.dart#L19-L27

    Is problematic since string.codeUnits (used when encrypting) returns UTF-16 code units:

    An unmodifiable list of the UTF-16 code units of this string.

    https://api.dart.dev/stable/2.15.1/dart-core/String/codeUnits.html

    While the decryption logic uses utf8.decode which is used to decode UTF-8.

    You should use utf8.encode to encode your String if your intension is to use UTF-8.

    opened by julemand101 2
  • Delete throws an error when file not found

    Delete throws an error when file not found

    If we don't have the file or a specific value, we should ignore the error and return a success, since the file does not exists and that's the point of deleting it 😁

    I/flutter (25796): 11:20:23.674 FileSystemException: Cannot delete file, path = '/data/user/0/package_name/app_flutter/cmatc3RlXaNvb4ZpZ19vdmVycmlkZQ==.enc' (OS Error: No such file or directory, errno = 2)
    
    bug P0 
    opened by ikbendewilliam 1
  • Code improvements

    Code improvements

    • Use a platform channel to check if ios is supported. Fixes #3
    • Rename platform channel from be.icapps to com.icapps. Fixes #11
    • Use compute when on non-supported platform. Fixes #4
    • Remove unwanted files from git. Fixes #19
    opened by NicolaVerbeeck 0
  • _keys should be saved somewhere.

    _keys should be saved somewhere.

    Right now the _keys field is always empty until you save something.

    We should save all the keys. So we always know what is saved and what is not saved.

    bug P0 
    opened by vanlooverenkoen 0
  • Specify output folder

    Specify output folder

    The output directory is just /Documents we should add an option to specify a specific output folder inside the Documents folder.

    example: /Documents/cache/customcache/2020

    enhancement P1 
    opened by vanlooverenkoen 0
  • Use method channel to check for >= iOS 13

    Use method channel to check for >= iOS 13

    Now we use the device_info_plus package, but we only need the one check. So it would be better to do the check native and return a bool.

    AS IS: It just checks != 12 so it would also match below 12!

    P0 improve code 
    opened by ikbendewilliam 0
Releases(0.0.5)
Owner
icapps
We mobilize your business
icapps
An implementation for flutter file storage

Flutter file storage An implementation for flutter file storage. For example keychain has a soft limit of 4kb. Using the file system instead we can st

icapps 1 Jan 11, 2022
A SECURE personal data Analysis and Storage system.

Magic Data Bottle Our goal is to design and implement a secure personal data analysis and storage system. Repo Structure app An android app written in

Xinpeng Wei 3 Sep 27, 2022
ToDo App made with flutter which stores your todos based on their categories. The data is stored in external application storage in your device in JSON file.

⭐ My ToDo ⭐ Built with ❤︎ by Akash Debnath This is my second project on Flutter. This app hepls you to keep record of your ToDos. You can create your

Akash Debnath 38 Dec 25, 2022
Flutter file based routing - File based routing and nested layouts for Flutter

Flutter File Based Routing I was inspired by the routing in remix.run with neste

Rody Davis 10 Sep 29, 2022
This project is a rebuild of the existing movie colony https://github.com/debbsefe/Movie-Colony. Here's also a link to the figma file https://www.figma.com/file/XpLFNEsROiN1z6lwnNHMrU/Movie-app?node-id=2956%3A10161

Tvfiy Generated by the Very Good CLI ?? A Very Good Project created by Very Good CLI. Getting Started ?? This project contains 3 flavors: development

Eferha Mamus 3 Nov 12, 2022
Flutter integration for Supabase. This package makes it simple for developers to build secure and scalable products.

supabase_flutter Flutter package for Supabase. What is Supabase Supabase is an open source Firebase alternative. We are a service to: listen to databa

Supabase 251 Jan 7, 2023
A beautiful, secure and simple authenticator app that supports multiple protocols and services. Free and open source. Written in Flutter and Dart.

OpenAuth A beautiful, secure and simple authenticator app that supports multiple protocols and services. Free and open source. Written in Flutter and

Isaiah Collins Abetong 31 Oct 5, 2022
Appwrite is a secure end-to-end backend server for Web, Mobile, and Flutter developers that is packaged as a set of Docker containers for easy deployment 🚀

A complete backend solution for your [Flutter / Vue / Angular / React / iOS / Android / *ANY OTHER*] app Appwrite 0.12 has been released! Learn what's

Appwrite 28.2k Jan 3, 2023
An easy configurable and secure open-source personal password manager.

An easy configurable and secure open-source personal password manager. Anyone can you this project and generate his own personal mobile app. All the passwords will be saved into your own Firebase Firestone database with encryption.

Shudipto Trafder 18 Dec 28, 2022
Mobile secure keyboard to prevent KeyLogger attack and screen capture.

Mobile secure keyboard to prevent KeyLogger attack and screen capture. Screenshots Alphanumeric Numeric Getting started To use this plugin, add flutte

null 20 Dec 22, 2022
Naan is an easy to use and secure wallet for NFTs & DeFi on the Tezos blockchain.

Naan - A Tasty Tezos Wallet Naan is a fun, simple, and secure way to create a Tezos wallet, collect NFTs, and explore the new world of Web3 on Tezos.

Tezsure 3 Aug 26, 2022
Generate secure passwords, check for exposed passwords, get visual feedback for password strength or get form validation with a minimum password strength required.

password_strength_checker Generate secure passwords, check for exposed passwords, get visual feedback for password strength or get form validation wit

Dario Varriale 6 Aug 8, 2023
Get It - Simple direct Service Locator that allows to decouple the interface from a concrete implementation and to access the concrete implementation from everywhere in your App. Maintainer: @escamoteur

❤️ Sponsor get_it This is a simple Service Locator for Dart and Flutter projects with some additional goodies highly inspired by Splat. It can be used

Flutter Community 1k Jan 1, 2023
Download files from Firebase Storage with Flutter. List all images, videos, or other files from Firebase and download them.

Flutter Tutorial - Download Files From Firebase Storage Download files from Firebase Storage with Flutter. List all images, videos, or other files fro

Johannes Milke 28 Dec 4, 2022
Upload Files To Firebase Storage with Flutter. Pick images, videos, or other files from your device and upload them to Firebase.

Flutter Tutorial - Upload Files To Firebase Storage Upload Files To Firebase Storage with Flutter. Pick images, videos, or other files from your devic

Johannes Milke 30 Dec 28, 2022
A font loader to download, cache and load web fonts in flutter with support for Firebase Cloud Storage.

Dynamic Cached Fonts A simple, easy to use yet customizable font loader to use web fonts. Demo: https://sidrao2006.github.io/dynamic_cached_fonts ?? I

Aneesh Rao 18 Dec 21, 2022
Picture upload widget for Flutter which helps selecting and uploading one or multiple images to firebase storage.

Flutter Firebase Picture Uploader This library offers a Picture Upload widget which can be used to upload one or multiple images to your Firebase Stor

Christoph Rothermel 12 Oct 21, 2022
Flutter Plugin used to query audios/songs infos [title, artist, album, etc..] from device storage.

on_audio_query on_audio_query is a Flutter Plugin used to query audios/songs ?? infos [title, artist, album, etc..] from device storage. Help: Any pro

Lucas Josino 31 Dec 10, 2022
A cached Flutter ImageProvider for Firebase Cloud Storage image objects

?? Firebase Image Provider A cached Flutter ImageProvider for Firebase Cloud Sto

KaHero 0 Nov 2, 2022