패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.0.4

secure_shared_preferences

Android의 SharedPreferences와 iOS의 UserDefaults를 암호화하기 위한 간단하면서도 강력한 패키지입니다.

AndroidiOSmacOS
30일 다운로드
403
좋아요
25
Pub 점수
140

패키지 설치

flutter pub add secure_shared_preferences

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

안드로이드의 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 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.