
Flutter Dart Thunder Encryption Decryption
This project convert readable ( Plain ) strings to unreadable ( Cipher ) and decryption strings .
Installation
To install thunder_encryption , run the following command:
dart pub add thunder_encryption
Usage
// Test normal String [ EN ]
String plainEnString = "Abd Alftah Nedal AlShanti";
String cipherEnString = TextEncryption.textEncryption(plainEnString);
String encipherEnString = TextDecryption.textDecryption(cipherEnString);
// Test symbols
String plainSymbolString = "(=++*/\$@!*)";
String cipherSymbolString = TextEncryption.textEncryption(plainSymbolString);
String encipherSymbolString =
TextDecryption.textDecryption(cipherSymbolString);
// Test normal String [ AR ]
String plainArString = "عبد الفتاح نضال الشنطي";
String cipherArString = TextEncryption.textEncryption(plainArString);
String encipherArString = TextDecryption.textDecryption(cipherArString);
print("\n" + ("*" * 25) + " Test EN String " + ("*" * 25));
print("Plain EN Text : $plainEnString");
print("Cipher EN Text : $cipherEnString");
print("Encipher EN Text : $encipherEnString");
print("\n" + ("*" * 25) + " Test Symbols String " + ("*" * 25));
print("Plain Symbol Text : $plainSymbolString");
print("Cipher Symbol Text : $cipherSymbolString");
print("Encipher Symbol Text : $encipherSymbolString");
print("\n" + ("*" * 25) + " Test AR String " + ("*" * 25));
print("Plain AR Text : $plainArString");
print("Cipher AR Text : $cipherArString");
print("Encipher AR Text : $encipherArString");
Contributing
Feel free to contribute to this project by opening issues, suggesting new features, or submitting pull requests , or add new languages.
Add Languages:
1- Go to lib/core/strings
2- Create new file for new language ex en_letters / ar_letters
3- create a Map<String , int> for letter to use it in encryption and create Map<int , String> to use in decryption
class EnLetters {
// create singleton for ConstStrings
static final EnLetters instance = EnLetters._internal();
factory EnLetters() => instance;
EnLetters._internal();
Map<String, int> enSmallLettersStringKey = {
"a": 0,
"b": 1,
}
Map<int, String> enSmallLettersIntKey = {
0: "a",
1: "b",
}
}
4- Go to lib/core/strings/letters_init.dart then add new language in setupLetters method
License
This project is licensed under the MIT License.
Libraries
- core/model/key_model
- core/model/letters_key_model
- core/strings/letters/ar_letters
- core/strings/letters/en_letters
- core/strings/letters/numbers
- core/strings/letters/symbol
- core/strings/letters_init
- encryption
- Support for doing something awesome.
- feature/key_generation/extract_key
- feature/key_generation/generate_key
- feature/text_encryption_decryption/text_decryption
- feature/text_encryption_decryption/text_encryption
- main