パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.0.4

secure_shared_preferences

Android の SharedPreferences と iOS の UserDefaults を暗号化するための、使いやすく強力なパッケージです。

AndroidiOSmacOS
30日間ダウンロード
403
いいね数
25
Pub ポイント
140

パッケージをインストール

flutter pub add secure_shared_preferences

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Android の SharedPreferences および iOS の UserDefaults を暗号化し、強力な暗号化で機密データを保護するセキュアで使いやすいパッケージです。Flutter アプリにスムーズに統合され、デバイスが侵害された場合でもユーザーのデータが機密性を保ちます。複雑な設定なしに堅牢なローカルストレージが必要な開発者向けに設計されており、暗号化の詳細を抽象化しつつも高いセキュリティ基準を維持しています。トークン、パスワード、またはその他の個人情報を保存するのに最適です。

用途

  • 認証トークンの保存
  • ユーザーの設定を安全に保存する
  • 機密なアプリデータの保護
  • ログイン資格情報の保護
  • 構成設定の暗号化

主な機能

  • エンドツーエンド暗号化
  • クロスプラットフォーム対応(Android、iOS、macOS)
  • シンプルなAPI統合
  • 自動キー管理
  • デフォルトで安全

適している対象

  • 機密ユーザー情報を扱うアプリ
  • 認証重視のアプリケーション
  • コンプライアンスに焦点を当てたプロジェクト
  • セキュリティを最優先とする開発者
  • モバイルファーストアプリケーション

注意事項

  • 適切なキーの取り扱いが必要です
  • 基本的なキー値ストレージに制限されています
  • 組み込みのバックアップ/リストアなし
  • 大規模データセットにおけるパフォーマンスオーバーヘッド
  • 複雑なデータ構造には適していません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Encryption is important

pub points Pub

Features

  • Simple to use yet powerful package to encypt shared preferences in android and UserDefaults in iOS.
  • You have an option to by pass encryption just by passing a bool.
  • Supports String, int, bool, double, map and List<String>.
  • Uses advance AES-CBC-128 algorithm for encryption.
  • Encrypts both key and value.
  • Integration unit tests available here

Getting started

  1. add dependency in pubspec.yaml file secure_shared_preferences:0.0.4
  2. add import import 'package:secure_shared_preferences/secure_shared_preferences.dart';

Usage

  1. To save string data type to secure storage.
    var pref = await SecureSharedPref.getInstance();
    pref.putString("Key", "This is data I want to save to local storage", isEncrypted : true);
  1. To get string data type to secure storage.
    var pref = await SecureSharedPref.getInstance();
    pref.getString("Key", isEncrypted : true);

Additional information

Encryption flow chart

FlowChart

Usage
  1. Save :
    var pref = await SecureSharedPref.getInstance();
    await pref.putString("StringEncrypted", "This is my first string test",isEncrypted: true);
    await pref.putInt("key", 100, isEncrypted: true);
    await pref.putMap("mapKey", {"Hello":true}, isEncrypted: true);
    await pref.putDouble("doubleKey", 20.32, isEncrypted: true);
    await pref.putBool("boolKey", true,isEncrypted:  true);
    await pref.putStringList("listKey", ["S","K"], isEncrypted: true);

First parameter is the 'key' Second parameter is the value Third parameter is whether you want to encrypt this key/value or not.

  1. Fetch :
    var pref = await SecureSharedPref.getInstance();
    await pref.getString("StringEncrypted", isEncrypted: true);
    await pref.getInt("key", isEncrypted: true);
    await pref.getMap("mapKey", isEncrypted: true);
    await pref.getDouble("doubleKey", isEncrypted: true);
    await pref.getBool("boolKey",isEncrypted: true);
    await pref.getStringList("listKey", isEncrypted: true);

First parameter is the 'key' Second parameter is whether you have encrypted this key/value or not.

カテゴリー

依存関係

依存関係一覧 5 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。