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

패키지 상세v1.0.4

native_encryptor

네이티브 코드를 사용하여 Flutter 앱에서 데이터를 안전하게 암호화/복호화하세요. 보안을 강화하기 위해 임의의 솔트와 IV를 추가하세요. 사용하기 쉬운 API로 크로스 플랫폼 호환성 제공.

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

소스 저장소

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

아직 데이터가 없습니다.