rsaa_crypt 0.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 64

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.0.2] - 1st March 2020. #

  • Bug Fixes

[0.0.1] - 26th February 2020. #

  • Added code for Text and File Encryption and Decryption.

example/README.md

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);
      });

Use this package as a library

1. Depend on it

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


dependencies:
  rsaa_crypt: ^0.0.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:rsaa_crypt/rsaa_crypt.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
38
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
64
Learn more about scoring.

We analyzed this package on Jun 5, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.2
  • pana: 0.13.8-dev
  • Flutter: 1.17.1

Health issues and suggestions

Document public APIs. (-1 points)

41 out of 41 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (logger).

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
basic_utils ^2.5.0 2.5.3
crypto ^2.1.3 2.1.5
flutter 0.0.0
logger ^0.8.3 0.8.3 0.9.1
Transitive dependencies
asn1lib 0.6.4
charcode 1.1.3
collection 1.14.12
convert 2.1.1
http 0.12.1
http_parser 3.1.4
intl 0.16.1
io 0.3.4
json_annotation 3.0.1
logging 0.11.4
meta 1.1.8
path 1.7.0
pedantic 1.9.0
pointycastle 1.0.2
sky_engine 0.0.99
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test