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

パッケージ詳細v1.0.4

native_encryptor

ネイティブコードを使用して、Flutterアプリでデータを安全に暗号化/復号化します。セキュリティを強化するためにランダムなソルトとIVを追加します。使いやすく、クロスプラットフォーム対応です。

AndroidiOSmacOS
30日間ダウンロード
22
いいね数
6
Pub ポイント
130

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

flutter pub add native_encryptor

パッケージ概要

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

NativeEncryptor は、Android、iOS、macOS でネイティブコードを使用してデータの安全な暗号化および復号化を可能にする Flutter パッケージです。各暗号化操作にランダムなソルトと初期化ベクトル(IV)を自動的に追加することで、セキュリティを強化しています。シンプルさを重視して設計されており、使いやすい API を提供しながらもクロスプラットフォーム互換性を維持しています。モバイルアプリ内でのユーザーの機密データ(認証情報、トークン、個人情報など)の保護に最適です。

用途

  • ユーザー資格情報の安全な保管
  • ローカルアプリデータの暗号化
  • 機密設定ファイルの保護
  • 暗号化されたペイロードの安全な転送
  • データプライバシー規制への準拠

主な機能

  • より高いパフォーマンスのためのネイティブ暗号化を使用
  • ランダムなソルトとIVを自動的に生成します
  • Android、iOS、macOS におけるクロスプラットフォーム対応
  • シンプルで直感的な API
  • ランダムな暗号化パラメータによるセキュリティの強化

適している対象

  • 高いデータセキュリティを必要とするアプリ
  • プライバシーを重視したアプリケーションを開発する開発者
  • GDPRまたはHIPAA準拠が必要なプロジェクト
  • 機密ユーザー情報を扱うモバイルアプリ
  • パフォーマンスとセキュリティを重視するチーム

注意事項

  • 各プラットフォームでネイティブコードの統合が必要です
  • ネイティブ依存関係のため、アプリサイズがわずかに増加する可能性があります
  • メモリ制約のため、非常に大きなデータセットには適していません
  • 暗号化アルゴリズムのカスタマイズが限定的
  • パッケージ外の鍵管理の正しく実装されていることに依存する

元の README

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

Native Encryptor for Flutter

A powerful plugin for secure data handling in your Flutter apps.

Key Features

  • Native Code Integration: Ensures top-tier security and performance.
  • Random Salt & IV: Adds an extra layer of protection.
  • Passphrase-Based Encryption: Customizable and flexible security.
  • User-Friendly API:** Simplifies integration into your Flutter app.
  • Cross-Platform Compatibility: Works seamlessly on both iOS and Android.
Screenshots
encrypted_value decrypted_value input_content

Installation

  1. Add to pubspec.yaml:

    YAML

dependencies:
   native_encryptor: <latest_version>
  1. Fetch the plugin:

Bash

flutter pub get
  1. Import in your Dart code: Dart
     import 'package:native_encryptor/native_encryptor.dart';
    

Basic Usage

Dart

import 'package:flutter/material.dart';
import 'package:native_encryptor/native_encryptor.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final    _nativeEncryptorPlugin = NativeEncryptor();
  final TextEditingController _controller = TextEditingController(text: "Secret Message");
  String? encryptedData;
  String? decryptedData;
  final String passphrase = "YourSecretPassphrase";

  Future<void> encrypt() async {
    encryptedData = await _nativeEncryptorPlugin.encrypt(
      passPhrase: passphrase,
      contentToEncrypt: _controller.text,
    );
    setState(() {});
  }

  Future<void> decrypt() async {
    decryptedData = await _nativeEncryptorPlugin.decrypt(
      passPhrase: passphrase,
      concatenatedCipherText: encryptedData!,
    );
    setState(() {});
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Native    Encryptor')),
        body: Padding(
          padding: const EdgeInsets.all(16.0),
          child: Column(
            children: [
              TextField(
                controller: _controller,
                decoration: const InputDecoration(labelText:    'Enter text'),
              ),
              ElevatedButton(onPressed: encrypt, child: const Text('Encrypt')),
              if (encryptedData != null)
                Text('Encrypted: $encryptedData'),
              ElevatedButton(onPressed: decrypt, child: const Text('Decrypt')),
              if (decryptedData != null)
                Text('Decrypted: $decryptedData'),
            ],
          ),
        ),
      ),
    );
  }
}

API Reference

  • encrypt({required String passPhrase, required String contentToEncrypt}) Encrypts the given content with the provided passphrase. Returns: The encrypted data as a string.
  • decrypt({required String passPhrase, required String concatenatedCipherText}) Decrypts the given encrypted data with the provided passphrase. Returns: The original decrypted content.
  • getPlatformVersion() Retrieves the current platform version for debugging purposes.

License

This plugin is licensed under the MIT License.

Contributing

We welcome contributions! Please feel free to open issues or submit pull requests.

Connect with me:

  • GitHub: https://github.com/subhashDev11
  • LinkedIn: https://www.linkedin.com/in/subhashcs/
  • Medium: https://medium.com/@subhashchandrashukla

Enhance your Flutter app's security with Native Encryptor!

カテゴリー

依存関係

依存関係一覧 2 件

  • plugin_platform_interface^2.1.8
  • web^1.1.0

ソースリポジトリ

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

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