rsaa_crypt 0.0.1 copy "rsaa_crypt: ^0.0.1" to clipboard
rsaa_crypt: ^0.0.1 copied to clipboard

outdated

Enables you to quickly implement RSAA file and text encryption in your flutter app.

RSAA Crypt #

Flutter plugin to use RSAA 1024 bit symmetric file and text on-device encryption in your app.

Features #

  • 1024 bit secure symmetric encryption
  • Supports all types of files for for File Encyption.
  • Supports Text and Base64 ciphers for Text Encryption.
  • No change in encrypted files or Text size (in bytes using Text Mode).

Installing #

A step by step series of examples that tell you how to get a development env running

  1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  rsaa_crypt: ^0.0.1
  1. Install it

You can install packages from the command line with Flutter.

$ flutter pub get
  1. Import it

Now in your Dart code, you can use:

import 'package:rsaa_crypt/rsaa_crypt.dart';

Example #


import 'package:rsaa_crypt/rsaa_crypt.dart';

String key = '🐻🎌',
        message = 'Hello! CzeΕ›Δ‡! 🐻🎌 δ½ ε₯½! γ”ζŒ¨ζ‹ΆοΌΠŸΡ€ΠΈΠ²Π΅Ρ‚! β„Œπ”’π”©π”©π”¬!',
        cipher,
        decipher;

// Text Encryption (Text Cipher)
RSAACrypt().encryptText(key, message).then((value) {
        cipher = Util().bytesToText(value);
      });
      
// Text Decryption (Text Cipher)
RSAACrypt().decryptText(key, Util().textToBytes(cipher)).then((value) {
        decipher = value;
      });
      
// Text Encryption (Base64 Cipher)
RSAACrypt().encryptText(key, message).then((value) {
        cipher = Util().bytesToBase64(value);
      });
      
// Text Decryption (Base64 Cipher)
RSAACrypt().decryptText(key, Util().base64ToBytes(cipher)).then((value) {
        decipher = value;
      });

// File Encryption
RSAACrypt().encryptFile(key, File(inputFilePath)).then((value) {
        Util().writeFile(encryptedFilePath, value);
      });

// File Decryption
RSAACrypt().decryptFile(key, File(encryptedFilePath)).then((value) {
        Util().writeFile(decryptedFilePath, value);
      });

Contributing #

Contributions will be acceptied at a later time.

Authors #

  • Vishal Robertson - Initial work - Robetron

See also the list of contributors who participated in this project.

License #

This project is licensed under the Apache License 2.0 - see the LICENSE.md file for details

0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Enables you to quickly implement RSAA file and text encryption in your flutter app.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

basic_utils, crypto, flutter, logger

More

Packages that depend on rsaa_crypt