Skip to content

πŸ” Super-fast AES-256 file encryption for Flutter with chunk-based processing for large files. πŸš€

License

Notifications You must be signed in to change notification settings

highspot/file_encrypter

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

33 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” File Encrypter

pub package

Super-fast file encryption library for Flutter, utilizing AES-256 encryption in CBC mode with PKCS5 padding. This package is designed to handle large files efficiently. πŸš€

✨ Features

  • πŸ”’ AES-256 Encryption: Secure your files with a strong encryption standard.
  • πŸ”„ CBC Mode with PKCS5 Padding: Ensures compatibility and security.
  • πŸ“‚ Handles Large Files: Optimized for encrypting and decrypting big files.
  • ⚑ Chunk-Based Encryption: Files are encrypted and decrypted in chunks to improve performance and support large files efficiently.

πŸš€ Usage

πŸ” Encrypting a File

import 'package:file_encrypter/file_encrypter.dart';

void main() async {
  String secretKey = await FileEncrypter.encrypt(
    inFilename: 'open_file.mkv',
    outFileName: 'encrypted_file.dat',
  );

  print('πŸ”’ Encryption complete. Secret key: \$secretKey');
}

This will create encrypted_file.dat, an encrypted version of open_file.mkv. The secretKey is a base64-encoded key generated using a cryptographic random number generator.

πŸ”“ Decrypting a File

import 'package:file_encrypter/file_encrypter.dart';

void main() async {
  String key = 'your_base64_secret_key'; // Use the key from the encryption step

  await FileEncrypter.decrypt(
    key: key,
    inFilename: 'encrypted_file.dat',
    outFileName: 'open_file.mkv',
  );

  print('πŸ”“ Decryption complete.');
}

This will restore open_file.mkv from encrypted_file.dat.

πŸ“œ License

This project is licensed under the BSD-3-Clause License.


For more details, visit the official package page.

About

πŸ” Super-fast AES-256 file encryption for Flutter with chunk-based processing for large files. πŸš€

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 49.7%
  • Swift 28.5%
  • Kotlin 15.1%
  • Ruby 6.6%
  • Objective-C 0.1%