RSA encryption package.
Getting Started #
RSA keys generator, String encryption and decryption and String signing.
How it works #
let say Alice want to send a message to Bob. a normal messaging solution would be : Alice write the message and send it to Bob the only problem is that the Message will be transferred in PlainText and every one who intercept the message can read it.
This is were RSA comes to play:
- We generate keys( public & private ) for Bob.
- If Alice wanted to send a message to Bob she have to encrypt that message with Bob's public keys.
- Then the encrypted message will be transferred to Bob and only Bob's private key can decrypt that message.
that way no none can decrypt the message except the owner of that specific private key.
How to use #
in order to use RSA encryption you need to generate 2 keys a public key (used to encrypt a text) and a private key (used to decrypt a text).
- Generating the keys
getKeys(); ///This function will generate keys
- encrypting a message
encryptedMessage = encrypt(messagePlainText, BobPublicKey);
- decrypt a message
decryptedText = decrypt(encryptedMessage, BobPrivateKey);
More on RSA #
please note that main.dart is just demonstration on how to use rsa_encryption
For help getting started with Flutter, view our
online documentation, which offers tutorials,
samples, guidance on mobile development, and a full API reference.
[0.0.2] - TODO: 02/12/2019.
- Changin main.dart to example.dart to avoid conflict.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: rsa_encryption: ^0.0.2
2. Install it
You can install packages from the command line:
$ pub get
$ flutter pub get
Alternatively, your editor might support
pub get or
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:rsa_encryption/example.dart'; import 'package:rsa_encryption/rsa/rsa_key_helper.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
This package is not analyzed, because it is discontinued.
|Dart SDK||>=2.1.0 <3.0.0|