पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

GitHub रिपॉज़िटरीthe-kool-sk/secure_shared_preferences

secure_shared_preferences

the-kool-sk/secure_shared_preferences open-source repository details.

secure_shared_preferences प्रोजेक्ट कवर
स्टार
5
फ़ोर्क
13
अंतिम पुश (UTC)
2 जुल॰ 2024
प्रोजेक्ट स्थिति
सक्रिय

मूल README

यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।

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.

Suraj Kulkarni GitHub avatar
GitHub लेखक

Suraj Kulkarni ↗

Cornerstone OndemandPune
भाषाएँDartHTMLRubySwiftKotlinObjective-C

इस रिपॉज़िटरी के पैकेज

उपयोग की गई निर्भरताएँ

निर्भरता सूची 9 आइटम

अपने प्रोजेक्ट के लिए रिपॉज़िटरी कैसे चुनें?

उपयोग के अनुसार छाँटें, गतिविधि की तुलना करें और अपनाने से पहले मूल प्रोजेक्ट की आवश्यकताएँ जाँचें।

  1. नाम, लेखक या विवरण से खोजें और तकनीकी विषय से परिणाम सीमित करें।
  2. स्टार, फ़ोर्क और हाल के पुश की तुलना करें। स्टार रुचि दर्शाते हैं, गुणवत्ता की गारंटी नहीं।
  3. उपयोग से पहले GitHub पर README, लाइसेंस और Issues जाँचें।

स्रोत और रखरखाव

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗