├── lib ├── src │ ├── screens │ │ ├── widgets │ │ │ ├── animated_icons.dart │ │ │ ├── titleBar.dart │ │ │ ├── avatar_name.dart │ │ │ ├── test.dart │ │ │ ├── send_rec_menu.dart │ │ │ ├── card.dart │ │ │ ├── attack_menu.dart │ │ │ ├── reciever_chat.dart │ │ │ ├── sender_chat.dart │ │ │ ├── msg_field.dart │ │ │ └── chat_section.dart │ │ └── view │ │ │ ├── main_screen.dart │ │ │ ├── settings.dart │ │ │ ├── communicate.dart │ │ │ └── plot.dart │ ├── configs │ │ ├── palette.dart │ │ └── keys.dart │ ├── state_management │ │ └── provider.dart │ ├── my_app.dart │ └── methods │ │ └── requests.dart └── main.dart ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist └── .gitignore ├── .idea ├── .gitignore ├── vcs.xml ├── dictionaries │ └── Donia.xml ├── misc.xml ├── runConfigurations │ └── main_dart.xml ├── modules.xml └── libraries │ ├── KotlinJavaRuntime.xml │ ├── Dart_SDK.xml │ └── Flutter_Plugins.xml ├── assets ├── logos │ ├── logo.png │ └── logo2.png ├── images │ ├── logo2.png │ ├── hacker.png │ ├── hacker2.png │ ├── hacker3.png │ ├── reciever.png │ ├── sender.png │ ├── statistics.png │ ├── brute_force.png │ ├── chosen_cipher.png │ ├── communicate.png │ ├── send_recieve.png │ ├── send_recieve_2.png │ └── send_recieve_4.png ├── fonts │ ├── Alien Robot.otf │ ├── Alien Robot.ttf │ ├── Alien Robot Italic.otf │ └── Alien Robot Italic.ttf ├── efficiency.txt ├── n.txt └── times.txt ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── rsa_algorithm │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle ├── build.gradle └── rsa_algorithm_android.iml ├── windows ├── runner │ ├── resources │ │ ├── app_icon.ico │ │ └── logo_exe.ico │ ├── resource.h │ ├── CMakeLists.txt │ ├── utils.h │ ├── runner.exe.manifest │ ├── flutter_window.h │ ├── main.cpp │ ├── utils.cpp │ ├── flutter_window.cpp │ ├── Runner.rc │ ├── win32_window.h │ └── win32_window.cpp ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugin_registrant.cc │ ├── generated_plugins.cmake │ └── CMakeLists.txt ├── .gitignore └── CMakeLists.txt ├── .metadata ├── .gitignore ├── .flutter-plugins ├── test └── widget_test.dart ├── analysis_options.yaml ├── rsa_algorithm.iml ├── .flutter-plugins-dependencies ├── pubspec.yaml └── README.md /lib/src/screens/widgets/animated_icons.dart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /assets/logos/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/assets/logos/logo.png -------------------------------------------------------------------------------- /assets/images/logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/assets/images/logo2.png -------------------------------------------------------------------------------- /assets/logos/logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/assets/logos/logo2.png -------------------------------------------------------------------------------- /assets/images/hacker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/assets/images/hacker.png -------------------------------------------------------------------------------- /assets/images/hacker2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/assets/images/hacker2.png -------------------------------------------------------------------------------- /assets/images/hacker3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/assets/images/hacker3.png -------------------------------------------------------------------------------- /assets/images/reciever.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/assets/images/reciever.png -------------------------------------------------------------------------------- /assets/images/sender.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/assets/images/sender.png -------------------------------------------------------------------------------- /assets/fonts/Alien Robot.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/assets/fonts/Alien Robot.otf -------------------------------------------------------------------------------- /assets/fonts/Alien Robot.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/assets/fonts/Alien Robot.ttf -------------------------------------------------------------------------------- /assets/images/statistics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/assets/images/statistics.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /assets/images/brute_force.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/assets/images/brute_force.png -------------------------------------------------------------------------------- /assets/images/chosen_cipher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/assets/images/chosen_cipher.png -------------------------------------------------------------------------------- /assets/images/communicate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/assets/images/communicate.png -------------------------------------------------------------------------------- /assets/images/send_recieve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/assets/images/send_recieve.png -------------------------------------------------------------------------------- /assets/images/send_recieve_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/assets/images/send_recieve_2.png -------------------------------------------------------------------------------- /assets/images/send_recieve_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/assets/images/send_recieve_4.png -------------------------------------------------------------------------------- /assets/fonts/Alien Robot Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/assets/fonts/Alien Robot Italic.otf -------------------------------------------------------------------------------- /assets/fonts/Alien Robot Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/assets/fonts/Alien Robot Italic.ttf -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /windows/runner/resources/logo_exe.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/windows/runner/resources/logo_exe.ico -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DoniaEsawi/Your-Safe-Zone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/dictionaries/Donia.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | raghad 5 | recieve 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/rsa_algorithm/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.rsa_algorithm 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/src/configs/palette.dart: -------------------------------------------------------------------------------- 1 | import "package:flutter/cupertino.dart"; 2 | 3 | const Color backGround= Color(0xff001021); 4 | const Color titleColor= Color(0xff28AF89); 5 | const Color grad1= Color(0xff45A247); 6 | const Color grad2= Color(0xff283C86); 7 | const Color grad3= Color(0xff4063de); 8 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip 7 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/runConfigurations/main_dart.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /assets/efficiency.txt: -------------------------------------------------------------------------------- 1 | 0.0010001659393310547 2 | 0.0010004043579101562 3 | 0.0019998550415039062 4 | 0.0030024051666259766 5 | 0.004000186920166016 6 | 0.004995107650756836 7 | 0.005999326705932617 8 | 0.007999420166015625 9 | 0.00899958610534668 10 | 0.011999845504760742 11 | 0.014998674392700195 12 | 0.01700282096862793 13 | 0.01999974250793457 14 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 097d3313d8e2c7f901932d63e537c1acefb87800 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /lib/src/screens/view/main_screen.dart: -------------------------------------------------------------------------------- 1 | import "package:flutter/material.dart"; 2 | import "package:rsa_algorithm/src/screens/view/splash.dart"; 3 | 4 | class MainScreen extends StatefulWidget { 5 | const MainScreen({Key? key}) : super(key: key); 6 | 7 | @override 8 | _MainScreenState createState() => _MainScreenState(); 9 | } 10 | 11 | class _MainScreenState extends State { 12 | @override 13 | Widget build(BuildContext context) => const Scaffold( 14 | body: SplashScreen( 15 | 16 | ), 17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | **/ios/Flutter/.last_build_id 13 | .dart_tool/ 14 | .flutter-plugins 15 | .flutter-plugins-dependencies 16 | .packages 17 | .pub-cache/ 18 | .pub/ 19 | /build/ 20 | 21 | # Visual Studio cache files 22 | # files ending in .cache can be ignored 23 | *.[Cc]ache 24 | # but keep track of directories ending in .cache 25 | !*.[Cc]ache/ 26 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /assets/n.txt: -------------------------------------------------------------------------------- 1 | 143 2 | 589 3 | 2173 4 | 7387 5 | 40991 6 | 174283 7 | 420437 8 | 1520237 9 | 4592767 10 | 38894291 11 | 154677511 12 | 560971601 13 | 2130627887 14 | 11109596081 15 | 34498777693 16 | 136909046959 17 | 558408435281 18 | 2288892413779 19 | 7598797884919 20 | 30032770970221 21 | 179863787783297 22 | 688120698714583 23 | 1419893482419337 24 | 7460836467464713 25 | 28633147316097791 26 | 122084568340980463 27 | 495712503903015449 28 | 2303170791039405373 29 | 12894046629665716861 30 | 42059655302474556907 31 | 215982698633401758953 32 | 1015464882984230315159 33 | 2763183924182099834599 34 | 6032537271439145838307 -------------------------------------------------------------------------------- /assets/times.txt: -------------------------------------------------------------------------------- 1 | 0.000990152359008789 2 | 0.0 3 | 0.0 4 | 0.0010001659393310547 5 | 0.0 6 | 0.0 7 | 0.0 8 | 0.0 9 | 0.0 10 | 0.0 11 | 0.0 12 | 0.000997304916381836 13 | 0.002000093460083008 14 | 0.005005359649658203 15 | 0.0076143741607666016 16 | 0.01701641082763672 17 | 0.03086376190185547 18 | 0.05699920654296875 19 | 0.11404705047607422 20 | 0.222001314163208 21 | 0.554997444152832 22 | 1.2500004768371582 23 | 1.758000373840332 24 | 4.197587490081787 25 | 6.69227933883667 26 | 13.453072547912598 27 | 31.831918239593506 28 | 84.47438287734985 29 | 298.10521602630615 30 | 597.2310910224915 31 | 1496.669587135315 32 | 3401.3530054092407 33 | 5398.678356170654 34 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | add_executable(${BINARY_NAME} WIN32 5 | "flutter_window.cpp" 6 | "main.cpp" 7 | "utils.cpp" 8 | "win32_window.cpp" 9 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 10 | "Runner.rc" 11 | "runner.exe.manifest" 12 | ) 13 | apply_standard_settings(${BINARY_NAME}) 14 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 15 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 16 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 17 | add_dependencies(${BINARY_NAME} flutter_assemble) 18 | -------------------------------------------------------------------------------- /.idea/libraries/KotlinJavaRuntime.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://www.dartlang.org/guides/libraries/private-files 2 | 3 | # Files and directories created by pub 4 | .dart_tool/ 5 | .packages 6 | build/ 7 | # If you're building an application, you may want to check-in your pubspec.lock 8 | pubspec.lock 9 | 10 | # Directory created by dartdoc 11 | # If you don't generate documentation locally you can remove this line. 12 | doc/api/ 13 | 14 | # Avoid committing generated Javascript files: 15 | *.dart.js 16 | *.info.json # Produced by the --dump-info flag. 17 | *.js # When generated by dart2js. Don't specify *.js if your 18 | # project includes source files written in JavaScript. 19 | *.js_ 20 | *.js.deps 21 | *.js.map 22 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | void RegisterPlugins(flutter::PluginRegistry* registry) { 14 | BitsdojoWindowPluginRegisterWithRegistrar( 15 | registry->GetRegistrarForPlugin("BitsdojoWindowPlugin")); 16 | DesktopWindowPluginRegisterWithRegistrar( 17 | registry->GetRegistrarForPlugin("DesktopWindowPlugin")); 18 | WindowManagerPluginRegisterWithRegistrar( 19 | registry->GetRegistrarForPlugin("WindowManagerPlugin")); 20 | } 21 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | bitsdojo_window_windows 7 | desktop_window 8 | window_manager 9 | ) 10 | 11 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 12 | ) 13 | 14 | set(PLUGIN_BUNDLED_LIBRARIES) 15 | 16 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 17 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 18 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 20 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 21 | endforeach(plugin) 22 | 23 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 24 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 25 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 26 | endforeach(ffi_plugin) 27 | -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /lib/src/configs/keys.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: non_constant_identifier_names 2 | 3 | BigInt P_raghad= BigInt.parse("4482248151160106609871348145316174897" 4 | "9849764719554039096395688045048053310178487"); 5 | BigInt Q_raghad= BigInt.parse("548751333868475192731096931542049703954" 6 | "75080920935355580245252923343305939004903"); 7 | BigInt P_donia= BigInt.parse("1853239550094717445070938338493667986838" 8 | "3424444311405679463280782405796233163977"); 9 | BigInt Q_donia= BigInt.parse("396886448368328825261738315775361178158" 10 | "18454437810437210221644553381995813014959"); 11 | int gen=0; 12 | 13 | String e_donia=""; 14 | String d_donia=""; 15 | String n_donia=""; 16 | String e_raghad=""; 17 | String n_raghad=""; 18 | String d_raghad=""; 19 | 20 | int getMaxMsgLength(BigInt p, BigInt q) 21 | { 22 | int i=0; 23 | BigInt n= p*q; 24 | while(n>BigInt.zero) 25 | { 26 | n=BigInt.from(n/BigInt.from(256)); 27 | i++; 28 | } 29 | return i; 30 | } 31 | 32 | String hostUrl="http://127.0.0.1:5000"; 33 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/libraries/Dart_SDK.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /lib/src/screens/widgets/titleBar.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: file_names, always_specify_types 2 | 3 | import "package:bitsdojo_window/bitsdojo_window.dart"; 4 | import "package:flutter/material.dart"; 5 | import "package:rsa_algorithm/src/configs/palette.dart"; 6 | 7 | final WindowButtonColors buttonColors = WindowButtonColors( 8 | iconNormal: grad1, 9 | mouseOver: grad1, 10 | mouseDown: grad2, 11 | iconMouseOver: backGround, 12 | iconMouseDown: backGround); 13 | 14 | final WindowButtonColors closeButtonColors = WindowButtonColors( 15 | mouseOver: const Color(0xFFD32F2F), 16 | mouseDown: const Color(0xFFB71C1C), 17 | iconNormal: grad1, 18 | iconMouseOver: backGround); 19 | 20 | class WindowButtons extends StatelessWidget { 21 | const WindowButtons({Key? key}) : super(key: key); 22 | 23 | @override 24 | Widget build(BuildContext context) => Row( 25 | children: [ 26 | MinimizeWindowButton(colors: buttonColors), 27 | MaximizeWindowButton(colors: buttonColors), 28 | CloseWindowButton(colors: closeButtonColors), 29 | ], 30 | ); 31 | } -------------------------------------------------------------------------------- /.idea/libraries/Flutter_Plugins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.flutter-plugins: -------------------------------------------------------------------------------- 1 | # This is a generated file; do not edit or check into version control. 2 | bitsdojo_window=C:\\Users\\Donia\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\bitsdojo_window-0.1.1+1\\ 3 | bitsdojo_window_linux=C:\\Users\\Donia\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\bitsdojo_window_linux-0.1.1\\ 4 | bitsdojo_window_macos=C:\\Users\\Donia\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\bitsdojo_window_macos-0.1.0\\ 5 | bitsdojo_window_windows=C:\\Users\\Donia\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\bitsdojo_window_windows-0.1.0\\ 6 | desktop_window=C:\\Users\\Donia\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\desktop_window-0.4.0\\ 7 | file_picker=C:\\Users\\Donia\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\file_picker-4.5.1\\ 8 | flutter_plugin_android_lifecycle=C:\\Users\\Donia\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\flutter_plugin_android_lifecycle-2.0.6\\ 9 | fluttertoast=C:\\Users\\Donia\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\fluttertoast-8.0.9\\ 10 | window_manager=C:\\Users\\Donia\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\window_manager-0.2.1\\ 11 | -------------------------------------------------------------------------------- /lib/src/state_management/provider.dart: -------------------------------------------------------------------------------- 1 | import "package:flutter/material.dart"; 2 | 3 | class Msgs extends ChangeNotifier { 4 | /// 0->sent, 1->received 5 | Map> atDonia=> {}; 6 | List atDoniaEnc=[]; 7 | 8 | //////////////////////////////////////// 9 | Map> atRaghad=> {}; 10 | List atRaghadEnc=[]; 11 | 12 | 13 | void sentFromDonia(String msg,String enc) { 14 | atDonia[atDoniaEnc.length]=["sent", 15 | msg]; 16 | 17 | atDoniaEnc.add(enc); 18 | notifyListeners(); 19 | } 20 | 21 | void receivedToDonia(String msg,String enc) { 22 | atDonia[atDoniaEnc.length]=["rec", 23 | msg]; 24 | atDoniaEnc.add(enc); 25 | notifyListeners(); 26 | } 27 | 28 | void sentFromRaghad(String msg,String enc) { 29 | atRaghad[atRaghadEnc.length]=["sent", 30 | msg]; 31 | atRaghadEnc.add(enc); 32 | notifyListeners(); 33 | } 34 | 35 | void receivedToRaghad(String msg,String enc) { 36 | atRaghad[atRaghadEnc.length]=["rec", 37 | msg]; 38 | atRaghadEnc.add(enc); 39 | notifyListeners(); 40 | } 41 | } -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import "package:flutter/material.dart"; 9 | import "package:flutter_test/flutter_test.dart"; 10 | 11 | import "package:rsa_algorithm/src/my_app.dart"; 12 | 13 | void main() { 14 | testWidgets("Counter increments smoke test", (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const App()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text("0"), findsOneWidget); 20 | expect(find.text("1"), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text("0"), findsNothing); 28 | expect(find.text("1"), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | 2 | import "package:flutter/material.dart"; 3 | import "package:flutter/services.dart"; 4 | import "package:rsa_algorithm/src/my_app.dart"; 5 | 6 | 7 | 8 | Future main()async{ 9 | 10 | WidgetsFlutterBinding.ensureInitialized(); 11 | // // // Must add this line. 12 | // await WindowManager.instance.ensureInitialized(); 13 | // // 14 | // // // Use it only after calling `hiddenWindowAtLaunch` 15 | // await WindowManager.instance.waitUntilReadyToShow().then((_) async{ 16 | // // set to frameless window 17 | // // await windowmanager.instance.setasframeless(); 18 | // await windowmanager.instance.setfullscreen(false); 19 | // await windowmanager.instance.setposition(offset.zero); 20 | // windowmanager.instance.show(); 21 | // doWhenWindowReady(() { 22 | // // ignore: always_specify_types 23 | // final win = appWindow; 24 | // //final Size initialSize = Size(1500, ); 25 | // //win.hide(); 26 | // //win.minSize = initialSize; 27 | // //win.size = initialSize; 28 | // win.alignment = Alignment.center; 29 | // win.title = "Custom window with Flutter"; 30 | // win.show(); 31 | // 32 | // }); 33 | // }); 34 | 35 | SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle( 36 | statusBarColor: Colors.white 37 | )); 38 | Paint.enableDithering = true; 39 | runApp(const App()); 40 | 41 | // Add this code below 42 | } 43 | 44 | 45 | -------------------------------------------------------------------------------- /android/rsa_algorithm_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | #include 8 | auto bdw = bitsdojo_window_configure(BDW_CUSTOM_FRAME); 9 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 10 | _In_ wchar_t *command_line, _In_ int show_command) { 11 | // Attach to console when present (e.g., 'flutter run') or create a 12 | // new console when running with a debugger. 13 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 14 | CreateAndAttachConsole(); 15 | } 16 | 17 | // Initialize COM, so that it is available for use in the library and/or 18 | // plugins. 19 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 20 | 21 | flutter::DartProject project(L"data"); 22 | 23 | std::vector command_line_arguments = 24 | GetCommandLineArguments(); 25 | 26 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 27 | 28 | FlutterWindow window(project); 29 | Win32Window::Point origin(10, 10); 30 | Win32Window::Size size(1280, 720); 31 | if (!window.CreateAndShow(L"rsa_algorithm", origin, size)) { 32 | return EXIT_FAILURE; 33 | } 34 | window.SetQuitOnClose(true); 35 | 36 | ::MSG msg; 37 | while (::GetMessage(&msg, nullptr, 0, 0)) { 38 | ::TranslateMessage(&msg); 39 | ::DispatchMessage(&msg); 40 | } 41 | 42 | ::CoUninitialize(); 43 | return EXIT_SUCCESS; 44 | } 45 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/src/my_app.dart: -------------------------------------------------------------------------------- 1 | import "package:flutter/material.dart"; 2 | import "package:provider/provider.dart"; 3 | import "package:rsa_algorithm/src/configs/palette.dart"; 4 | import "package:rsa_algorithm/src/screens/view/main_screen.dart"; 5 | import "package:rsa_algorithm/src/state_management/provider.dart"; 6 | class App extends StatelessWidget { 7 | const App({Key? key}) : super(key: key); 8 | 9 | // This widget is the root of your application. 10 | @override 11 | Widget build(BuildContext context) => MultiProvider( 12 | // ignore: always_specify_types 13 | providers: [ 14 | // ignore: always_specify_types 15 | ChangeNotifierProvider.value( 16 | value: Msgs(), 17 | ), 18 | ], 19 | child: MaterialApp( 20 | 21 | theme: ThemeData( 22 | // Define the default brightness and colors. 23 | backgroundColor: backGround, 24 | scrollbarTheme: ScrollbarThemeData( 25 | //trackColor: MaterialStateProperty.all(grad1), 26 | thumbColor: MaterialStateProperty.all(Colors.white30), 27 | ), 28 | scaffoldBackgroundColor: backGround, 29 | // Define the default font family. 30 | primaryColor: grad1, 31 | // Define the default `TextTheme`. Use this to specify the default 32 | // text styling for headlines, titles, bodies of text, and more. 33 | fontFamily: "robot_alien", 34 | elevatedButtonTheme: ElevatedButtonThemeData( 35 | style: ButtonStyle( 36 | backgroundColor: MaterialStateProperty.all(grad1) 37 | ) 38 | 39 | ) 40 | ), 41 | debugShowCheckedModeBanner: false, 42 | home: const MainScreen(), 43 | ), 44 | ); 45 | } 46 | 47 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Rsa Algorithm 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | rsa_algorithm 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr); 51 | if (target_length == 0) { 52 | return std::string(); 53 | } 54 | std::string utf8_string; 55 | utf8_string.resize(target_length); 56 | int converted_length = ::WideCharToMultiByte( 57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 58 | -1, utf8_string.data(), 59 | target_length, nullptr, nullptr); 60 | if (converted_length == 0) { 61 | return std::string(); 62 | } 63 | return utf8_string; 64 | } 65 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | return true; 30 | } 31 | 32 | void FlutterWindow::OnDestroy() { 33 | if (flutter_controller_) { 34 | flutter_controller_ = nullptr; 35 | } 36 | 37 | Win32Window::OnDestroy(); 38 | } 39 | 40 | LRESULT 41 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 42 | WPARAM const wparam, 43 | LPARAM const lparam) noexcept { 44 | // Give Flutter, including plugins, an opportunity to handle window messages. 45 | if (flutter_controller_) { 46 | std::optional result = 47 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 48 | lparam); 49 | if (result) { 50 | return *result; 51 | } 52 | } 53 | 54 | switch (message) { 55 | case WM_FONTCHANGE: 56 | flutter_controller_->engine()->ReloadSystemFonts(); 57 | break; 58 | } 59 | 60 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 61 | } 62 | -------------------------------------------------------------------------------- /lib/src/screens/widgets/avatar_name.dart: -------------------------------------------------------------------------------- 1 | import "package:flutter/material.dart"; 2 | import "package:rsa_algorithm/src/configs/palette.dart"; 3 | 4 | class AvatarName extends StatelessWidget { 5 | final bool isSender; 6 | final bool showName; 7 | const AvatarName({ 8 | required this.showName, 9 | required this.isSender, 10 | Key? key, 11 | }) : super(key: key); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | Color mainColor=isSender?grad1:grad2; 16 | return Column( 17 | mainAxisAlignment: MainAxisAlignment.start, 18 | children: [ 19 | Padding( 20 | padding: const EdgeInsets.all(8.0), 21 | child: Container( 22 | width: 65, 23 | height: 65, 24 | decoration: BoxDecoration( 25 | color: backGround, 26 | boxShadow: [ 27 | const BoxShadow(color: Colors.black45, 28 | offset: Offset(5,5), 29 | blurRadius: 11, 30 | ), 31 | BoxShadow(color: 32 | const Color(0xff717171).withOpacity(0.1), 33 | offset: const Offset(-5,-5), 34 | blurRadius: 11, 35 | ), 36 | 37 | ], 38 | borderRadius: const BorderRadius.all( 39 | Radius.circular(40.0), 40 | ), 41 | ), 42 | child: ClipRRect( 43 | borderRadius: const BorderRadius.all( 44 | Radius.circular(5.0), 45 | ), 46 | child: Padding( 47 | padding: const EdgeInsets.all(8.0), 48 | child: Image.asset( 49 | isSender?"assets/images/sender.png": 50 | "assets/images/reciever.png" 51 | ), 52 | ), 53 | ), 54 | ), 55 | ), 56 | showName?Text(isSender?"Raghad": 57 | "Donia", 58 | style: TextStyle( 59 | color: mainColor 60 | ),):Container() 61 | ], 62 | ); 63 | } 64 | } -------------------------------------------------------------------------------- /lib/src/screens/widgets/test.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: lines_longer_than_80_chars, always_specify_types, always_put_required_named_parameters_first 2 | 3 | import "package:flutter/material.dart"; 4 | import "package:stringr/stringr.dart"; 5 | 6 | 7 | 8 | class TestString extends StatefulWidget { 9 | const TestString({Key? key, required this.title}) : super(key: key); 10 | 11 | final String title; 12 | 13 | @override 14 | _TestStringState createState() => _TestStringState(); 15 | } 16 | 17 | class _TestStringState extends State { 18 | @override 19 | Widget build(BuildContext context) => Scaffold( 20 | appBar: AppBar( 21 | title: Text(widget.title), 22 | ), 23 | body: ListView( 24 | children: [ 25 | cardWidget( 26 | "camelCase", "XMLHttpRequest", "XMLHttpRequest".camelCase()), 27 | cardWidget("camelCase", "/home/Kb/code/stringr", 28 | "/home/Kb/code/stringr".camelCase()), 29 | cardWidget("capitalize", "яблоко", "яблоко".capitalize()), 30 | cardWidget("codePointAt", "\uD835\uDC00\uD835\uDC01", 31 | "\uD835\uDC00\uD835\uDC01".codePointAt(2).toString()), 32 | cardWidget( 33 | "graphemeAt", 34 | "\uD834\uDF06\u0303\u035C\u035D\u035Ebar\uD834\uDF06\u0303\u035C\u035D".replaceAll(r"\u", r"\ii"), 35 | "foo\uD834\uDF06\u0303\u035C\u035D\u035Ebar\uD834\uDF06\u0303\u035C\u035D" 36 | .graphemeAt(3)), 37 | cardWidget("prune", "Привет как дела", "Привет как дела".prune(10)), 38 | cardWidget("prune", "La variété la plus fréquente est la blanche", 39 | "La variété la plus fréquente est la blanche".prune(12)), 40 | cardWidget("truncate", "Is this where you wanna go", 41 | "Is this where you wanna go".truncate(10)), 42 | ], 43 | ), 44 | ); 45 | 46 | Widget cardWidget(String libFunc, String input, String output) => Card( 47 | child: Column( 48 | mainAxisSize: MainAxisSize.min, 49 | children: [ 50 | Text("Function - $libFunc"), 51 | Text("Input - $input"), 52 | Text("Output - $output") 53 | ], 54 | ), 55 | ); 56 | } -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | 31 | compileOptions { 32 | sourceCompatibility JavaVersion.VERSION_1_8 33 | targetCompatibility JavaVersion.VERSION_1_8 34 | } 35 | 36 | kotlinOptions { 37 | jvmTarget = '1.8' 38 | } 39 | 40 | sourceSets { 41 | main.java.srcDirs += 'src/main/kotlin' 42 | } 43 | 44 | defaultConfig { 45 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 46 | applicationId "com.example.rsa_algorithm" 47 | minSdkVersion flutter.minSdkVersion 48 | targetSdkVersion flutter.targetSdkVersion 49 | versionCode flutterVersionCode.toInteger() 50 | versionName flutterVersionName 51 | } 52 | 53 | buildTypes { 54 | release { 55 | // TODO: Add your own signing config for the release build. 56 | // Signing with the debug keys for now, so `flutter run --release` works. 57 | signingConfig signingConfigs.debug 58 | } 59 | } 60 | } 61 | 62 | flutter { 63 | source '../..' 64 | } 65 | 66 | dependencies { 67 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 68 | } 69 | -------------------------------------------------------------------------------- /lib/src/screens/view/settings.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: always_specify_types, avoid_print, duplicate_ignore 2 | 3 | import "package:bitsdojo_window/bitsdojo_window.dart"; 4 | import "package:desktop_window/desktop_window.dart"; 5 | import "package:flutter/material.dart"; 6 | import "package:rsa_algorithm/src/configs/keys.dart"; 7 | import "package:rsa_algorithm/src/screens/widgets/titleBar.dart"; 8 | 9 | class Settings extends StatefulWidget { 10 | const Settings({Key? key}) : super(key: key); 11 | 12 | @override 13 | _SettingsState createState() => _SettingsState(); 14 | } 15 | 16 | class _SettingsState extends State { 17 | @override 18 | Widget build(BuildContext context) => Scaffold( 19 | body: Column( 20 | mainAxisAlignment: MainAxisAlignment.center, 21 | children: [ 22 | WindowTitleBarBox( 23 | child: Row( 24 | children: [ 25 | Expanded( 26 | child: Row( 27 | children: [ 28 | Padding( 29 | padding: const EdgeInsets.all(2.0), 30 | child: Image.asset("assets/logos/logo2.png",width: 30,), 31 | ), 32 | 33 | ], 34 | ), 35 | ), 36 | Expanded( 37 | child: Row( 38 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 39 | children: [ 40 | 41 | 42 | Expanded(child: MoveWindow()), 43 | WindowButtons() 44 | ]), 45 | ), 46 | ], 47 | )), 48 | Expanded( 49 | child: Center( 50 | child: ElevatedButton( 51 | onPressed: ()async{ 52 | print(getMaxMsgLength(P_raghad, Q_raghad)); 53 | Size size = await DesktopWindow.getWindowSize(); 54 | // ignore: avoid_print 55 | print(size); 56 | }, 57 | child: const Text("get max length"), 58 | ), 59 | ), 60 | ), 61 | ], 62 | ), 63 | 64 | ); 65 | } 66 | -------------------------------------------------------------------------------- /lib/src/screens/widgets/send_rec_menu.dart: -------------------------------------------------------------------------------- 1 | import "package:flutter/material.dart"; 2 | import "package:responsive_grid/responsive_grid.dart"; 3 | import "package:rsa_algorithm/src/screens/widgets/card.dart"; 4 | 5 | class SendRecieveMenu extends StatelessWidget { 6 | final VoidCallback onComClicked; 7 | final VoidCallback onStatisticsClicked; 8 | const SendRecieveMenu({ 9 | required this.onComClicked, 10 | required this.onStatisticsClicked, 11 | required this.endedFade, 12 | 13 | Key? key, 14 | }) : super(key: key); 15 | 16 | final bool endedFade; 17 | 18 | @override 19 | Widget build(BuildContext context) => SizedBox( 20 | width: MediaQuery.of(context).size.width, 21 | child: SingleChildScrollView( 22 | 23 | child: Center( 24 | child: Padding( 25 | padding: const 26 | EdgeInsets.symmetric(horizontal: 16.0), 27 | child: ResponsiveGridRow( 28 | children: [ 29 | ResponsiveGridCol( 30 | xl: 3, 31 | lg: 0, 32 | xs: 0, 33 | child: Container( 34 | ), 35 | ), 36 | ResponsiveGridCol( 37 | xl: 3, 38 | lg: 6, 39 | xs: 6, 40 | child: GestureDetector( 41 | onTap: onComClicked, 42 | child: MenuCard(endedFade: endedFade, 43 | imageName: "communicate.png", 44 | cardTitle: "Communicate", 45 | ), 46 | ), 47 | ), 48 | ResponsiveGridCol( 49 | xl: 3, 50 | lg: 6, 51 | xs: 6, 52 | child: GestureDetector( 53 | onTap: onStatisticsClicked, 54 | child: MenuCard(endedFade: endedFade, 55 | imageName: "statistics.png", 56 | cardTitle: "Statistics", 57 | 58 | ), 59 | ), 60 | ), 61 | ResponsiveGridCol( 62 | xl: 3, 63 | lg: 0, 64 | xs: 0, 65 | child: Container( 66 | ), 67 | ), 68 | 69 | ], 70 | ), 71 | ), 72 | ), 73 | ), 74 | ); 75 | } 76 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /lib/src/screens/widgets/card.dart: -------------------------------------------------------------------------------- 1 | import "package:clay_containers/clay_containers.dart"; 2 | import "package:flutter/gestures.dart"; 3 | import "package:flutter/material.dart"; 4 | import "package:rsa_algorithm/src/configs/palette.dart"; 5 | 6 | // ignore: must_be_immutable 7 | class MenuCard extends StatefulWidget { 8 | final String imageName; 9 | final String cardTitle; 10 | bool endedFade; 11 | MenuCard({ 12 | required this.imageName, 13 | required this.endedFade, 14 | required this.cardTitle, 15 | Key? key}) : super(key: key); 16 | 17 | @override 18 | _MenuCardState createState() => _MenuCardState(); 19 | } 20 | 21 | class _MenuCardState extends State { 22 | bool isHovered=false; 23 | @override 24 | Widget build(BuildContext context) => Padding( 25 | padding: const EdgeInsets.symmetric(horizontal: 16), 26 | child: MouseRegion( 27 | cursor: isHovered?SystemMouseCursors.click: 28 | SystemMouseCursors.basic 29 | , 30 | onHover: (PointerHoverEvent event){ 31 | setState(() { 32 | isHovered=true; 33 | }); 34 | }, 35 | onExit: (PointerExitEvent event){ 36 | setState(() { 37 | isHovered=false; 38 | }); 39 | }, 40 | child: ClayAnimatedContainer( 41 | duration: const Duration(milliseconds: 500), 42 | width: 300, 43 | height: 350, 44 | color: backGround, 45 | surfaceColor: backGround, 46 | spread: 1, 47 | emboss: false, 48 | curveType:isHovered? 49 | CurveType.concave:CurveType.convex, 50 | borderRadius: 25, 51 | depth: widget.endedFade?(isHovered?12:8):0, 52 | child: widget.endedFade?Column( 53 | crossAxisAlignment: CrossAxisAlignment.center, 54 | children: 55 | [Expanded(child: Padding( 56 | padding: const EdgeInsets.all(8.0), 57 | child: Image.asset("assets/images/${widget.imageName}"), 58 | )), 59 | Padding( 60 | padding: const EdgeInsets.symmetric(vertical: 32.0, 61 | horizontal: 8.0), 62 | child: Text(widget.cardTitle, 63 | textAlign: TextAlign.center, 64 | style: const TextStyle( 65 | color: grad1, 66 | fontFamily: "robot_alien", 67 | fontSize: 22 68 | ), 69 | ), 70 | ) 71 | ] 72 | ):Container(),), 73 | ), 74 | ); 75 | } 76 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | always_use_package_imports: true 26 | avoid_dynamic_calls: true 27 | avoid_print: true 28 | avoid_returning_null_for_future: true 29 | avoid_slow_async_io: true 30 | avoid_types_as_parameter_names: true 31 | close_sinks: true 32 | comment_references: true 33 | control_flow_in_finally: true 34 | empty_statements: true 35 | iterable_contains_unrelated_type: true 36 | list_remove_unrelated_type: true 37 | no_duplicate_case_values: true 38 | no_logic_in_create_state: true 39 | unnecessary_statements: true 40 | use_key_in_widget_constructors: true 41 | always_declare_return_types: true 42 | always_put_control_body_on_new_line: true 43 | always_put_required_named_parameters_first: true 44 | always_specify_types: true 45 | avoid_annotating_with_dynamic: true 46 | annotate_overrides: true 47 | avoid_multiple_declarations_per_line: true 48 | avoid_renaming_method_parameters: true 49 | avoid_return_types_on_setters: true 50 | avoid_returning_null: true 51 | avoid_setters_without_getters: true 52 | avoid_unnecessary_containers: true 53 | avoid_unused_constructor_parameters: true 54 | camel_case_extensions: true 55 | camel_case_types: true 56 | curly_braces_in_flow_control_structures: true 57 | file_names: true 58 | flutter_style_todos: true 59 | library_names: true 60 | lines_longer_than_80_chars: true 61 | package_api_docs: true 62 | prefer_double_quotes: true 63 | prefer_expression_function_bodies: true 64 | sized_box_for_whitespace: true 65 | slash_for_doc_comments: true 66 | unnecessary_this: true 67 | 68 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 69 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 70 | 71 | # Additional information about this file can be found at 72 | # https://dart.dev/guides/language/analysis-options 73 | -------------------------------------------------------------------------------- /windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\logo_exe.ico" 56 | 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | #ifdef FLUTTER_BUILD_NUMBER 64 | #define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0 67 | #endif 68 | 69 | #ifdef FLUTTER_BUILD_NAME 70 | #define VERSION_AS_STRING #FLUTTER_BUILD_NAME 71 | #else 72 | #define VERSION_AS_STRING "1.0.0" 73 | #endif 74 | 75 | VS_VERSION_INFO VERSIONINFO 76 | FILEVERSION VERSION_AS_NUMBER 77 | PRODUCTVERSION VERSION_AS_NUMBER 78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 79 | #ifdef _DEBUG 80 | FILEFLAGS VS_FF_DEBUG 81 | #else 82 | FILEFLAGS 0x0L 83 | #endif 84 | FILEOS VOS__WINDOWS32 85 | FILETYPE VFT_APP 86 | FILESUBTYPE 0x0L 87 | BEGIN 88 | BLOCK "StringFileInfo" 89 | BEGIN 90 | BLOCK "040904e4" 91 | BEGIN 92 | VALUE "CompanyName", "com.example" "\0" 93 | VALUE "FileDescription", "rsa_algorithm" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "rsa_algorithm" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2022 com.example. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "rsa_algorithm.exe" "\0" 98 | VALUE "ProductName", "rsa_algorithm" "\0" 99 | VALUE "ProductVersion", VERSION_AS_STRING "\0" 100 | END 101 | END 102 | BLOCK "VarFileInfo" 103 | BEGIN 104 | VALUE "Translation", 0x409, 1252 105 | END 106 | END 107 | 108 | #endif // English (United States) resources 109 | ///////////////////////////////////////////////////////////////////////////// 110 | 111 | 112 | 113 | #ifndef APSTUDIO_INVOKED 114 | ///////////////////////////////////////////////////////////////////////////// 115 | // 116 | // Generated from the TEXTINCLUDE 3 resource. 117 | // 118 | 119 | 120 | ///////////////////////////////////////////////////////////////////////////// 121 | #endif // not APSTUDIO_INVOKED 122 | -------------------------------------------------------------------------------- /rsa_algorithm.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /.flutter-plugins-dependencies: -------------------------------------------------------------------------------- 1 | {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"file_picker","path":"C:\\\\Users\\\\Donia\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\file_picker-4.5.1\\\\","native_build":true,"dependencies":[]},{"name":"fluttertoast","path":"C:\\\\Users\\\\Donia\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\fluttertoast-8.0.9\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"file_picker","path":"C:\\\\Users\\\\Donia\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\file_picker-4.5.1\\\\","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"]},{"name":"flutter_plugin_android_lifecycle","path":"C:\\\\Users\\\\Donia\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_plugin_android_lifecycle-2.0.6\\\\","native_build":true,"dependencies":[]},{"name":"fluttertoast","path":"C:\\\\Users\\\\Donia\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\fluttertoast-8.0.9\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"bitsdojo_window_macos","path":"C:\\\\Users\\\\Donia\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\bitsdojo_window_macos-0.1.0\\\\","native_build":true,"dependencies":[]},{"name":"desktop_window","path":"C:\\\\Users\\\\Donia\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\desktop_window-0.4.0\\\\","native_build":true,"dependencies":[]},{"name":"window_manager","path":"C:\\\\Users\\\\Donia\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\window_manager-0.2.1\\\\","native_build":true,"dependencies":[]}],"linux":[{"name":"bitsdojo_window_linux","path":"C:\\\\Users\\\\Donia\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\bitsdojo_window_linux-0.1.1\\\\","native_build":true,"dependencies":[]},{"name":"desktop_window","path":"C:\\\\Users\\\\Donia\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\desktop_window-0.4.0\\\\","native_build":true,"dependencies":[]},{"name":"window_manager","path":"C:\\\\Users\\\\Donia\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\window_manager-0.2.1\\\\","native_build":true,"dependencies":[]}],"windows":[{"name":"bitsdojo_window_windows","path":"C:\\\\Users\\\\Donia\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\bitsdojo_window_windows-0.1.0\\\\","native_build":true,"dependencies":[]},{"name":"desktop_window","path":"C:\\\\Users\\\\Donia\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\desktop_window-0.4.0\\\\","native_build":true,"dependencies":[]},{"name":"window_manager","path":"C:\\\\Users\\\\Donia\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\window_manager-0.2.1\\\\","native_build":true,"dependencies":[]}],"web":[{"name":"file_picker","path":"C:\\\\Users\\\\Donia\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\file_picker-4.5.1\\\\","dependencies":[]},{"name":"fluttertoast","path":"C:\\\\Users\\\\Donia\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\fluttertoast-8.0.9\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"bitsdojo_window","dependencies":["bitsdojo_window_windows","bitsdojo_window_macos","bitsdojo_window_linux"]},{"name":"bitsdojo_window_linux","dependencies":[]},{"name":"bitsdojo_window_macos","dependencies":[]},{"name":"bitsdojo_window_windows","dependencies":[]},{"name":"desktop_window","dependencies":[]},{"name":"file_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"fluttertoast","dependencies":[]},{"name":"window_manager","dependencies":[]}],"date_created":"2022-05-21 14:12:04.628690","version":"2.13.0-0.1.pre"} -------------------------------------------------------------------------------- /windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_WIN32_WINDOW_H_ 2 | #define RUNNER_WIN32_WINDOW_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 11 | // inherited from by classes that wish to specialize with custom 12 | // rendering and input handling 13 | class Win32Window { 14 | public: 15 | struct Point { 16 | unsigned int x; 17 | unsigned int y; 18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 19 | }; 20 | 21 | struct Size { 22 | unsigned int width; 23 | unsigned int height; 24 | Size(unsigned int width, unsigned int height) 25 | : width(width), height(height) {} 26 | }; 27 | 28 | Win32Window(); 29 | virtual ~Win32Window(); 30 | 31 | // Creates and shows a win32 window with |title| and position and size using 32 | // |origin| and |size|. New windows are created on the default monitor. Window 33 | // sizes are specified to the OS in physical pixels, hence to ensure a 34 | // consistent size to will treat the width height passed in to this function 35 | // as logical pixels and scale to appropriate for the default monitor. Returns 36 | // true if the window was created successfully. 37 | bool CreateAndShow(const std::wstring& title, 38 | const Point& origin, 39 | const Size& size); 40 | 41 | // Release OS resources associated with window. 42 | void Destroy(); 43 | 44 | // Inserts |content| into the window tree. 45 | void SetChildContent(HWND content); 46 | 47 | // Returns the backing Window handle to enable clients to set icon and other 48 | // window properties. Returns nullptr if the window has been destroyed. 49 | HWND GetHandle(); 50 | 51 | // If true, closing this window will quit the application. 52 | void SetQuitOnClose(bool quit_on_close); 53 | 54 | // Return a RECT representing the bounds of the current client area. 55 | RECT GetClientArea(); 56 | 57 | protected: 58 | // Processes and route salient window messages for mouse handling, 59 | // size change and DPI. Delegates handling of these to member overloads that 60 | // inheriting classes can handle. 61 | virtual LRESULT MessageHandler(HWND window, 62 | UINT const message, 63 | WPARAM const wparam, 64 | LPARAM const lparam) noexcept; 65 | 66 | // Called when CreateAndShow is called, allowing subclass window-related 67 | // setup. Subclasses should return false if setup fails. 68 | virtual bool OnCreate(); 69 | 70 | // Called when Destroy is called. 71 | virtual void OnDestroy(); 72 | 73 | private: 74 | friend class WindowClassRegistrar; 75 | 76 | // OS callback called by message pump. Handles the WM_NCCREATE message which 77 | // is passed when the non-client area is being created and enables automatic 78 | // non-client DPI scaling so that the non-client area automatically 79 | // responsponds to changes in DPI. All other messages are handled by 80 | // MessageHandler. 81 | static LRESULT CALLBACK WndProc(HWND const window, 82 | UINT const message, 83 | WPARAM const wparam, 84 | LPARAM const lparam) noexcept; 85 | 86 | // Retrieves a class instance pointer for |window| 87 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 88 | 89 | bool quit_on_close_ = false; 90 | 91 | // window handle for top level window. 92 | HWND window_handle_ = nullptr; 93 | 94 | // window handle for hosted content. 95 | HWND child_content_ = nullptr; 96 | }; 97 | 98 | #endif // RUNNER_WIN32_WINDOW_H_ 99 | -------------------------------------------------------------------------------- /windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(rsa_algorithm LANGUAGES CXX) 3 | 4 | set(BINARY_NAME "rsa_algorithm") 5 | 6 | cmake_policy(SET CMP0063 NEW) 7 | 8 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") 9 | 10 | # Configure build options. 11 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 12 | if(IS_MULTICONFIG) 13 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" 14 | CACHE STRING "" FORCE) 15 | else() 16 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 17 | set(CMAKE_BUILD_TYPE "Debug" CACHE 18 | STRING "Flutter build mode" FORCE) 19 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 20 | "Debug" "Profile" "Release") 21 | endif() 22 | endif() 23 | 24 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 25 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") 26 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") 27 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") 28 | 29 | # Use Unicode for all projects. 30 | add_definitions(-DUNICODE -D_UNICODE) 31 | 32 | # Compilation settings that should be applied to most targets. 33 | function(APPLY_STANDARD_SETTINGS TARGET) 34 | target_compile_features(${TARGET} PUBLIC cxx_std_17) 35 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") 36 | target_compile_options(${TARGET} PRIVATE /EHsc) 37 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") 38 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") 39 | endfunction() 40 | 41 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 42 | 43 | # Flutter library and tool build rules. 44 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 45 | 46 | # Application build 47 | add_subdirectory("runner") 48 | 49 | # Generated plugin build rules, which manage building the plugins and adding 50 | # them to the application. 51 | include(flutter/generated_plugins.cmake) 52 | 53 | 54 | # === Installation === 55 | # Support files are copied into place next to the executable, so that it can 56 | # run in place. This is done instead of making a separate bundle (as on Linux) 57 | # so that building and running from within Visual Studio will work. 58 | set(BUILD_BUNDLE_DIR "$") 59 | # Make the "install" step default, as it's required to run. 60 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 61 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 62 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 63 | endif() 64 | 65 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 66 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 67 | 68 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 69 | COMPONENT Runtime) 70 | 71 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 72 | COMPONENT Runtime) 73 | 74 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 75 | COMPONENT Runtime) 76 | 77 | if(PLUGIN_BUNDLED_LIBRARIES) 78 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 79 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 80 | COMPONENT Runtime) 81 | endif() 82 | 83 | # Fully re-copy the assets directory on each build to avoid having stale files 84 | # from a previous install. 85 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 86 | install(CODE " 87 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 88 | " COMPONENT Runtime) 89 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 90 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 91 | 92 | # Install the AOT library on non-Debug builds only. 93 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 94 | CONFIGURATIONS Profile;Release 95 | COMPONENT Runtime) 96 | -------------------------------------------------------------------------------- /windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | 3 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 4 | 5 | # Configuration provided via flutter tool. 6 | include(${EPHEMERAL_DIR}/generated_config.cmake) 7 | 8 | # TODO: Move the rest of this into files in ephemeral. See 9 | # https://github.com/flutter/flutter/issues/57146. 10 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 11 | 12 | # === Flutter Library === 13 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 14 | 15 | # Published to parent scope for install step. 16 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 17 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 18 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 19 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 20 | 21 | list(APPEND FLUTTER_LIBRARY_HEADERS 22 | "flutter_export.h" 23 | "flutter_windows.h" 24 | "flutter_messenger.h" 25 | "flutter_plugin_registrar.h" 26 | "flutter_texture_registrar.h" 27 | ) 28 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 29 | add_library(flutter INTERFACE) 30 | target_include_directories(flutter INTERFACE 31 | "${EPHEMERAL_DIR}" 32 | ) 33 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 34 | add_dependencies(flutter flutter_assemble) 35 | 36 | # === Wrapper === 37 | list(APPEND CPP_WRAPPER_SOURCES_CORE 38 | "core_implementations.cc" 39 | "standard_codec.cc" 40 | ) 41 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 42 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 43 | "plugin_registrar.cc" 44 | ) 45 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 46 | list(APPEND CPP_WRAPPER_SOURCES_APP 47 | "flutter_engine.cc" 48 | "flutter_view_controller.cc" 49 | ) 50 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 51 | 52 | # Wrapper sources needed for a plugin. 53 | add_library(flutter_wrapper_plugin STATIC 54 | ${CPP_WRAPPER_SOURCES_CORE} 55 | ${CPP_WRAPPER_SOURCES_PLUGIN} 56 | ) 57 | apply_standard_settings(flutter_wrapper_plugin) 58 | set_target_properties(flutter_wrapper_plugin PROPERTIES 59 | POSITION_INDEPENDENT_CODE ON) 60 | set_target_properties(flutter_wrapper_plugin PROPERTIES 61 | CXX_VISIBILITY_PRESET hidden) 62 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 63 | target_include_directories(flutter_wrapper_plugin PUBLIC 64 | "${WRAPPER_ROOT}/include" 65 | ) 66 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 67 | 68 | # Wrapper sources needed for the runner. 69 | add_library(flutter_wrapper_app STATIC 70 | ${CPP_WRAPPER_SOURCES_CORE} 71 | ${CPP_WRAPPER_SOURCES_APP} 72 | ) 73 | apply_standard_settings(flutter_wrapper_app) 74 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 75 | target_include_directories(flutter_wrapper_app PUBLIC 76 | "${WRAPPER_ROOT}/include" 77 | ) 78 | add_dependencies(flutter_wrapper_app flutter_assemble) 79 | 80 | # === Flutter tool backend === 81 | # _phony_ is a non-existent file to force this command to run every time, 82 | # since currently there's no way to get a full input/output list from the 83 | # flutter tool. 84 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 85 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 86 | add_custom_command( 87 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 88 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 89 | ${CPP_WRAPPER_SOURCES_APP} 90 | ${PHONY_OUTPUT} 91 | COMMAND ${CMAKE_COMMAND} -E env 92 | ${FLUTTER_TOOL_ENVIRONMENT} 93 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 94 | windows-x64 $ 95 | VERBATIM 96 | ) 97 | add_custom_target(flutter_assemble DEPENDS 98 | "${FLUTTER_LIBRARY}" 99 | ${FLUTTER_LIBRARY_HEADERS} 100 | ${CPP_WRAPPER_SOURCES_CORE} 101 | ${CPP_WRAPPER_SOURCES_PLUGIN} 102 | ${CPP_WRAPPER_SOURCES_APP} 103 | ) 104 | -------------------------------------------------------------------------------- /lib/src/screens/widgets/attack_menu.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: always_specify_types 2 | 3 | 4 | import "package:flutter/material.dart"; 5 | import "package:responsive_grid/responsive_grid.dart"; 6 | import "package:rsa_algorithm/src/methods/requests.dart"; 7 | import "package:rsa_algorithm/src/screens/view/bruteForceAttack.dart"; 8 | import "package:rsa_algorithm/src/screens/view/plot.dart"; 9 | import "package:rsa_algorithm/src/screens/widgets/card.dart"; 10 | class AttackMenu extends StatefulWidget { 11 | const AttackMenu({ 12 | required this.endedFade, 13 | Key? key, 14 | }) : super(key: key); 15 | 16 | final bool endedFade; 17 | 18 | @override 19 | State createState() => _AttackMenuState(); 20 | } 21 | 22 | class _AttackMenuState extends State { 23 | ListnBitSizesAttack=[for (int i = 8; i <= 72; i+=2) i]; 24 | 25 | @override 26 | Widget build(BuildContext context) => SizedBox( 27 | width: MediaQuery.of(context).size.width, 28 | child: Padding( 29 | padding: const EdgeInsets.symmetric 30 | (horizontal: 16.0), 31 | child: ResponsiveGridRow( 32 | rowSegments: 18, 33 | children: [ 34 | ResponsiveGridCol( 35 | xl: 3, 36 | lg: 0, 37 | xs: 0, 38 | child: Container( 39 | ), 40 | ), 41 | ResponsiveGridCol( 42 | xl: 4, 43 | lg: 6, 44 | xs: 6, 45 | child: GestureDetector( 46 | onTap: ()async{ 47 | await Navigator.push(context, 48 | MaterialPageRoute 49 | (builder: (BuildContext context)=> 50 | const Attack( 51 | isBF: true, 52 | ))); 53 | }, 54 | child: MenuCard(endedFade: widget.endedFade, 55 | imageName: "brute_force.png", 56 | cardTitle: "Brute Force", 57 | ), 58 | ), 59 | ), 60 | ResponsiveGridCol( 61 | xl: 4, 62 | lg: 6, 63 | xs: 6, 64 | child: GestureDetector( 65 | onTap: ()async{ 66 | await Navigator.push(context, 67 | MaterialPageRoute 68 | (builder: (BuildContext context)=> 69 | const Attack( 70 | isBF: false, 71 | ))); 72 | }, 73 | child: MenuCard(endedFade: widget.endedFade, 74 | imageName: "chosen_cipher.png", 75 | cardTitle: "Chosen Cipher Text", 76 | ), 77 | ), 78 | ), 79 | ResponsiveGridCol( 80 | xl: 4, 81 | lg: 6, 82 | xs: 6, 83 | child: GestureDetector( 84 | onTap: ()async{ 85 | List times= await getFileData("assets/times.txt"); 86 | List nValues= await getFileData("assets/n.txt"); 87 | 88 | Navigator.push(context, MaterialPageRoute 89 | (builder: (BuildContext context)=> 90 | EncrytionStatistics(attackTimes: times, 91 | isAttack: true, 92 | nValues: nValues, 93 | nBitSizes: nBitSizesAttack, 94 | ))); 95 | }, 96 | child: MenuCard(endedFade: widget.endedFade, 97 | imageName: "statistics.png", 98 | cardTitle: "Statistics", 99 | 100 | ), 101 | ), 102 | ), 103 | ResponsiveGridCol( 104 | xl: 3, 105 | lg: 0, 106 | xs: 0, 107 | child: Container( 108 | ), 109 | ), 110 | ], 111 | ), 112 | ), 113 | ); 114 | } 115 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: rsa_algorithm 2 | description: your easy security solution. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.16.1 <3.0.0" 22 | 23 | # Dependencies specify other packages that your package needs in order to work. 24 | # To automatically upgrade your package dependencies to the latest versions 25 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 26 | # dependencies can be manually updated by changing the version numbers below to 27 | # the latest version available on pub.dev. To see which dependencies have newer 28 | # versions available, run `flutter pub outdated`. 29 | dependencies: 30 | flutter: 31 | sdk: flutter 32 | desktop_window: ^0.4.0 33 | animated_text_kit: 34 | http: 35 | 36 | cupertino_icons: ^1.0.2 37 | clay_containers: 38 | flutter_neumorphic: 39 | responsive_grid: 40 | window_manager: 41 | bitsdojo_window: ^0.1.1 42 | carousel_slider: 43 | provider: 44 | fluttertoast: 45 | ninja_prime: 46 | flutter_spinkit: 47 | flutter_animated_button: 48 | fl_chart: 49 | stringr: 50 | file_picker: ^4.5.1 51 | dev_dependencies: 52 | flutter_test: 53 | sdk: flutter 54 | 55 | # The "flutter_lints" package below contains a set of recommended lints to 56 | # encourage good coding practices. The lint set provided by the package is 57 | # activated in the `analysis_options.yaml` file located at the root of your 58 | # package. See that file for information about deactivating specific lint 59 | # rules and activating additional ones. 60 | flutter_lints: ^1.0.0 61 | 62 | # For information on the generic Dart part of this file, see the 63 | # following page: https://dart.dev/tools/pub/pubspec 64 | 65 | # The following section is specific to Flutter. 66 | flutter: 67 | 68 | # The following line ensures that the Material Icons font is 69 | # included with your application, so that you can use the icons in 70 | # the material Icons class. 71 | uses-material-design: true 72 | 73 | # To add assets to your application, add an assets section, like this: 74 | assets: 75 | - assets/images/ 76 | - assets/logos/ 77 | - assets/n.txt 78 | - assets/times.txt 79 | - assets/efficiency.txt 80 | # An image asset can refer to one or more resolution-specific "variants", see 81 | # https://flutter.dev/assets-and-images/#resolution-aware. 82 | 83 | # For details regarding adding assets from package dependencies, see 84 | # https://flutter.dev/assets-and-images/#from-packages 85 | 86 | # To add custom fonts to your application, add a fonts section here, 87 | # in this "flutter" section. Each entry in this list should have a 88 | # "family" key with the font family name, and a "fonts" key with a 89 | # list giving the asset and other descriptors for the font. For 90 | # example: 91 | fonts: 92 | - family: robot_alien 93 | fonts: 94 | - asset: assets/fonts/Alien Robot.ttf 95 | # - asset: fonts/schyler-italic.ttf 96 | # style: italic 97 | # - family: Trajan Pro 98 | # fonts: 99 | # - asset: fonts/TrajanPro.ttf 100 | # - asset: fonts/TrajanPro_Bold.ttf 101 | # weight: 700 102 | # 103 | # For details regarding fonts from package dependencies, 104 | # see https://flutter.dev/custom-fonts/#from-packages 105 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 | 6 | 7 | 8 |

🔐 Your-Safe-Zone 🔐

9 | 10 |

A cyper security flutter desktop application that applies RSA algorithm to securely communicate between Raghad & Donia

11 | 12 | 13 |

14 | 15 | download 16 | 17 |

18 |
19 | 20 | 21 | 22 | 23 | ## Getting Started 24 | 25 | 26 | 27 | ### Prerequisites 28 | 29 | Install Flask 30 | ```sh 31 | python -m pip install flask 32 | ``` 33 | 34 | ### Installation 35 | 36 | 37 | 1. Clone the repo 38 | ```sh 39 | git clone https://github.com/Raghad-Khaled/Security_Project MY-PROJECT-NAME && cd MY-PROJECT-NAME\Raghad_Donia 40 | ``` 41 | 42 | 3. download the setup.exe from this link: 43 | 44 | ```sh 45 | https://www.mediafire.com/file/fgp08qp4sie24pb/yourSafeZone_setup.zip/file 46 | ``` 47 | 4. setup the program 48 | 49 | 50 |

(back to top)

51 | 52 | 53 | ### How To Start 54 | 55 | 1. run the flask app 56 | ```sh 57 | python -m flask run 58 | ``` 59 | or instead, follow the steps on this link to run any flask app on VSCode 60 | 61 | ```sh 62 | https://code.visualstudio.com/docs/python/tutorial-flask 63 | ``` 64 | 65 | 2. after running the flask app, copy the host url: 66 | 67 | ```sh 68 | e.g http://127.0.0.1:5000/ 69 | ``` 70 | 3. open YourSafeZone.exe, that u have installed earlier 71 | 72 | 4. paste the host URL in the .exe 73 | 74 | 75 |

(back to top)

76 | 77 | 78 | ## App Demo 79 | ### App Intro 80 | 81 | https://user-images.githubusercontent.com/56982963/169654352-aed3242c-1a6c-4c3d-bfb0-141a62bea9c9.mp4 82 | 83 | 84 | ### Communicate securely 85 | 86 | https://user-images.githubusercontent.com/56982963/169654881-5ab3ad05-0bcd-4a29-a4db-2bfaddabbf92.mp4 87 | 88 | 89 | 90 | 91 | https://user-images.githubusercontent.com/56982963/169655603-d649db67-3790-4346-a57e-c34e997dbdb5.mp4 92 | 93 | 94 | ### RSA Encryption Efficiency 95 | 96 | 97 | 98 | https://user-images.githubusercontent.com/56982963/169655741-4ab96a87-c2c7-4265-9f77-1d78d796a4e9.mp4 99 | 100 | ### Perform Chosen Cipher Attack 101 | 102 | 103 | 104 | https://user-images.githubusercontent.com/56982963/169656027-cbf52ec9-9473-4c29-907b-037567015ee0.mp4 105 | 106 | 107 | ### Perform Brute Force Attack 108 | 109 | 110 | https://user-images.githubusercontent.com/56982963/169655901-bba7b180-2783-4e86-be17-b0c34c68c519.mp4 111 | 112 | 113 | 114 | ### RSA Brute Force Attack Efficiency 115 | 116 | 117 | https://user-images.githubusercontent.com/56982963/169656108-38da6582-840f-43f7-a0d6-6ea68105e6e6.mp4 118 | 119 | 120 | 121 |

(back to top)

122 | 123 | 124 |

125 | icons8-pacman-48 Tools used 126 |

127 | 128 | 129 | 131 | 133 | 135 | 137 | 138 |

Flutter
130 |

Dart
132 |

Python
134 |

Flask
136 |
139 | 140 | 141 |

Contributors 142 |

143 | 144 | 145 |
146 | 147 | 148 | 149 | 151 | 153 | 154 |

Donia Esawy

150 |

Raghad Khaled

152 |
155 | 156 |
157 | 158 | 159 |

(back to top)

160 | -------------------------------------------------------------------------------- /lib/src/screens/widgets/reciever_chat.dart: -------------------------------------------------------------------------------- 1 | // ignore: prefer_double_quotes 2 | import 'dart:math'; 3 | 4 | import "package:flutter/material.dart"; 5 | import "package:rsa_algorithm/src/configs/palette.dart"; 6 | import "package:rsa_algorithm/src/screens/widgets/avatar_name.dart"; 7 | 8 | class Donia extends StatefulWidget { 9 | final bool sent; 10 | final String msg; 11 | final String encrypted; 12 | const Donia({ 13 | required this.encrypted, 14 | required this.sent, 15 | required this.msg, 16 | Key? key, 17 | }) : super(key: key); 18 | 19 | @override 20 | State createState() => _DoniaState(); 21 | } 22 | 23 | class _DoniaState extends State { 24 | bool showEncrypted=false; 25 | 26 | @override 27 | Widget build(BuildContext context) => Padding( 28 | padding: const EdgeInsets.all(8.0), 29 | child: Transform( 30 | alignment: Alignment.center, 31 | transform: Matrix4.rotationY(!widget.sent?0:pi), 32 | child: Row( 33 | crossAxisAlignment: CrossAxisAlignment.start, 34 | children: [ 35 | 36 | Expanded( 37 | child: Stack( 38 | children: [ 39 | Padding( 40 | padding: const EdgeInsets.only(right: 10, 41 | left: 50, 42 | top: 10, 43 | bottom: 10 44 | ), 45 | child: Container( 46 | decoration: BoxDecoration( 47 | color:grad1, 48 | borderRadius: const BorderRadius.only( 49 | topLeft: Radius.circular(15.0), 50 | topRight: Radius.circular(15.0), 51 | bottomLeft: Radius.circular(15.0), 52 | ), 53 | gradient:const LinearGradient( 54 | colors: [ 55 | Color(0xff076fdd), 56 | Color(0xff004794) 57 | ], 58 | end: Alignment.topRight, 59 | begin: Alignment.bottomLeft 60 | ), 61 | boxShadow: [ 62 | BoxShadow(color: grad2.withOpacity(0.2), 63 | offset: const Offset(3,3), 64 | blurRadius: 10, 65 | ), 66 | BoxShadow(color: 67 | const Color(0xff717171).withOpacity(0.15), 68 | offset: const Offset(-5,-5), 69 | blurRadius: 11, 70 | ), 71 | ], 72 | ), 73 | 74 | child: Padding( 75 | padding: const EdgeInsets.all(20.0), 76 | child: AnimatedContainer( 77 | width: double.infinity, 78 | duration:const Duration( 79 | milliseconds: 700, 80 | ), 81 | child: Transform( 82 | alignment: Alignment.center, 83 | transform: Matrix4.rotationY(!widget.sent?0:pi), 84 | child: Text(showEncrypted? 85 | widget.encrypted:widget.msg, 86 | style:const TextStyle(color: backGround, 87 | fontFamily: "roboto-mono", 88 | fontSize: 18 89 | ), 90 | textAlign: TextAlign.start, 91 | ), 92 | ), 93 | ), 94 | ), 95 | ), 96 | ), 97 | Positioned( 98 | bottom: 0, 99 | left: 50, 100 | child: Container( 101 | width: 30, 102 | height: 30, 103 | decoration: const BoxDecoration( 104 | borderRadius: BorderRadius.all( 105 | Radius.circular(25) 106 | ), 107 | color:grad1 108 | ), 109 | child: IconButton( 110 | icon: Icon(showEncrypted? 111 | Icons.lock_open: 112 | Icons.lock, 113 | color:grad2,size: 15,), 114 | onPressed: (){ 115 | setState(() { 116 | showEncrypted=!showEncrypted; 117 | }); 118 | }, 119 | 120 | ), 121 | )) 122 | ], 123 | ), 124 | ), 125 | Transform( 126 | alignment: Alignment.center, 127 | transform: Matrix4.rotationY(!widget.sent?0:pi), 128 | child: const AvatarName(isSender: false, 129 | showName: true, 130 | ), 131 | ), 132 | ], 133 | ), 134 | ), 135 | ); 136 | } 137 | -------------------------------------------------------------------------------- /lib/src/screens/widgets/sender_chat.dart: -------------------------------------------------------------------------------- 1 | import "dart:math"; 2 | 3 | import "package:flutter/material.dart"; 4 | import "package:rsa_algorithm/src/configs/palette.dart"; 5 | import "package:rsa_algorithm/src/screens/widgets/avatar_name.dart"; 6 | 7 | 8 | class Raghad extends StatefulWidget { 9 | final bool sent; 10 | final String msg; 11 | final String encrypted; 12 | const Raghad({ 13 | required this.encrypted, 14 | required this.sent, 15 | required this.msg, 16 | Key? key, 17 | }) : super(key: key); 18 | 19 | @override 20 | State createState() => _RaghadState(); 21 | } 22 | 23 | class _RaghadState extends State { 24 | bool showEncrypted=false; 25 | @override 26 | Widget build(BuildContext context) => Padding( 27 | padding: const EdgeInsets.all(8.0), 28 | child: Transform( 29 | alignment: Alignment.center, 30 | transform: Matrix4.rotationY(widget.sent?0:pi), 31 | child: Row( 32 | crossAxisAlignment: CrossAxisAlignment.start, 33 | children: [ 34 | Transform( 35 | alignment: Alignment.center, 36 | transform: Matrix4.rotationY(widget.sent?0:pi), 37 | child: const AvatarName(isSender: true, 38 | showName: true, 39 | ), 40 | ), 41 | Expanded( 42 | child: Stack( 43 | alignment: Alignment.center, 44 | children: [ 45 | Padding( 46 | padding: const EdgeInsets.only(left: 10, 47 | right: 50, 48 | top: 10, 49 | bottom: 10 50 | ), 51 | child: Column( 52 | // ignore: always_specify_types 53 | children: [ 54 | Container( 55 | width: double.infinity, 56 | decoration: BoxDecoration( 57 | color:grad1, 58 | borderRadius: const BorderRadius.only( 59 | topLeft: Radius.circular(15.0), 60 | topRight: Radius.circular(15.0), 61 | bottomRight: Radius.circular(15.0), 62 | ), 63 | gradient:const LinearGradient( 64 | colors: [ 65 | Color(0xff45A247), 66 | Color(0xff007903) 67 | ], 68 | begin: Alignment.topLeft, 69 | end: Alignment.bottomRight 70 | ), 71 | boxShadow: [ 72 | BoxShadow(color: 73 | grad1.withOpacity(0.2), 74 | offset: const Offset(3,3), 75 | blurRadius: 10, 76 | ), 77 | BoxShadow(color: 78 | const Color(0xff717171).withOpacity(0.15), 79 | offset: const Offset(-5,-5), 80 | blurRadius: 11, 81 | ), 82 | ], 83 | ), 84 | 85 | child: Padding( 86 | padding:const EdgeInsets.all(20.0), 87 | child: AnimatedContainer( 88 | duration:const Duration( 89 | milliseconds: 700, 90 | ), 91 | child: Transform( 92 | alignment: Alignment.center, 93 | transform: Matrix4.rotationY(widget.sent?0:pi), 94 | child: Text(showEncrypted? 95 | widget.encrypted:widget.msg.replaceAll("\\",r"\" ), 96 | style:const TextStyle(color: backGround, 97 | fontFamily: "roboto-mono", 98 | fontSize: 18 99 | ), 100 | textAlign: TextAlign.start, 101 | ), 102 | ), 103 | ), 104 | ), 105 | ), 106 | 107 | ], 108 | ), 109 | ), 110 | Positioned( 111 | bottom: 0, 112 | right: 50, 113 | child: Container( 114 | width: 30, 115 | height: 30, 116 | decoration: const BoxDecoration( 117 | borderRadius: BorderRadius.all( 118 | Radius.circular(25) 119 | ), 120 | color: grad2 121 | ), 122 | child: IconButton( 123 | icon: Icon(showEncrypted? 124 | Icons.lock_open: 125 | Icons.lock, 126 | color:grad1,size: 15,), 127 | onPressed: (){ 128 | setState(() { 129 | showEncrypted=!showEncrypted; 130 | 131 | }); 132 | }, 133 | 134 | ), 135 | )) 136 | ], 137 | ), 138 | ), 139 | ], 140 | ), 141 | ), 142 | ); 143 | 144 | } 145 | -------------------------------------------------------------------------------- /lib/src/methods/requests.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: avoid_print 2 | 3 | import "dart:convert"; 4 | 5 | import "package:flutter/services.dart"; 6 | import "package:http/http.dart" as http; 7 | import "package:rsa_algorithm/src/configs/keys.dart"; 8 | Future doniaSendMessage(String msg) async { 9 | final http.Response sendResponse =await http 10 | .get(Uri.parse("$hostUrl/donia/sender/$msg")); 11 | 12 | if (sendResponse.statusCode == 200) { 13 | // If the server did return a 200 OK response, 14 | // then parse the JSON. 15 | print(sendResponse.body); 16 | return jsonDecode(sendResponse.body); 17 | } else { 18 | // If the server did not return a 200 OK response, 19 | // then throw an exception. 20 | throw Exception("Failed to send data"); 21 | } 22 | } 23 | 24 | Future doniaRecMessage() async { 25 | final http.Response recResponse = await http 26 | .get(Uri.parse("$hostUrl/donia/reciever/$gen&$P_donia&$Q_donia")); 27 | if (recResponse.statusCode == 200) { 28 | // If the server did return a 200 OK response, 29 | // then parse the JSON. 30 | print(recResponse.body); 31 | return jsonDecode(recResponse.body); 32 | } else { 33 | // If the server did not return a 200 OK response, 34 | // then throw an exception. 35 | throw Exception("Failed to recieve data"); 36 | } 37 | } 38 | 39 | 40 | Future raghadSendMessage(String msg) async { 41 | final http.Response sendResponse =await http 42 | .get(Uri.parse("$hostUrl/raghad/sender/$msg")); 43 | 44 | if (sendResponse.statusCode == 200) { 45 | // If the server did return a 200 OK response, 46 | // then parse the JSON. 47 | print(sendResponse.body); 48 | return jsonDecode(sendResponse.body); 49 | } else { 50 | // If the server did not return a 200 OK response, 51 | // then throw an exception. 52 | print(sendResponse.body); 53 | print(msg); 54 | throw Exception("Failed to send data"); 55 | } 56 | } 57 | 58 | Future raghadRecMessage() async { 59 | final http.Response recResponse = await http 60 | .get(Uri.parse("$hostUrl/raghad/reciever/$gen&$P_raghad&$Q_raghad")); 61 | if (recResponse.statusCode == 200) { 62 | // If the server did return a 200 OK response, 63 | // then parse the JSON. 64 | print(recResponse.body); 65 | return jsonDecode(recResponse.body); 66 | } else { 67 | // If the server did not return a 200 OK response, 68 | // then throw an exception. 69 | throw Exception("Failed to recieve data"); 70 | } 71 | } 72 | 73 | Future raghadGetKeys() async { 74 | final http.Response recResponse = await http 75 | .get(Uri.parse("$hostUrl/raghad/keys/$gen&$P_raghad&$Q_raghad")); 76 | if (recResponse.statusCode == 200) { 77 | // If the server did return a 200 OK response, 78 | // then parse the JSON. 79 | print(recResponse.body); 80 | return jsonDecode(recResponse.body); 81 | } else { 82 | // If the server did not return a 200 OK response, 83 | // then throw an exception. 84 | throw Exception("Failed to recieve data"); 85 | } 86 | } 87 | 88 | Future doniaGetKeys() async { 89 | final http.Response recResponse = await http 90 | .get(Uri.parse("$hostUrl/donia/keys/$gen&$P_raghad&$Q_raghad")); 91 | if (recResponse.statusCode == 200) { 92 | // If the server did return a 200 OK response, 93 | // then parse the JSON. 94 | print(recResponse.body); 95 | return jsonDecode(recResponse.body); 96 | } else { 97 | // If the server did not return a 200 OK response, 98 | // then throw an exception. 99 | throw Exception("Failed to recieve data"); 100 | } 101 | } 102 | 103 | 104 | Future bfAttack(String n, String e, String c) async { 105 | final http.Response recResponse = await http 106 | .get(Uri.parse("$hostUrl/attack/bf/$n&$e&$c")); 107 | if (recResponse.statusCode == 200) { 108 | // If the server did return a 200 OK response, 109 | // then parse the JSON. 110 | print(recResponse.body); 111 | return jsonDecode(recResponse.body); 112 | } else { 113 | // If the server did not return a 200 OK response, 114 | // then throw an exception. 115 | throw Exception("Failed to recieve data"); 116 | } 117 | } 118 | 119 | Future initCCA(int index) async { 120 | final http.Response recResponse = await http 121 | .get(Uri.parse("$hostUrl/attack/cca/init/raghad/$index")); 122 | if (recResponse.statusCode == 200) { 123 | // If the server did return a 200 OK response, 124 | // then parse the JSON. 125 | print(recResponse.body); 126 | return jsonDecode(recResponse.body); 127 | } else { 128 | // If the server did not return a 200 OK response, 129 | // then throw an exception. 130 | throw Exception("Failed to recieve data"); 131 | } 132 | } 133 | 134 | Future startCCA(String c, String e, String n) async { 135 | final http.Response recResponse = await http 136 | .get(Uri.parse("$hostUrl/attack/cca/$c&$e&$n")); 137 | if (recResponse.statusCode == 200) { 138 | // If the server did return a 200 OK response, 139 | // then parse the JSON. 140 | print(recResponse.body); 141 | return jsonDecode(recResponse.body); 142 | } else { 143 | // If the server did not return a 200 OK response, 144 | // then throw an exception. 145 | throw Exception("Failed to recieve data"); 146 | } 147 | } 148 | 149 | Future> getFileData(String path) async { 150 | List times = []; 151 | await rootBundle.loadString(path).then((String q) { 152 | for (String i in const LineSplitter().convert(q)) { 153 | times.add(i); 154 | } 155 | }); 156 | return times; 157 | 158 | } -------------------------------------------------------------------------------- /lib/src/screens/widgets/msg_field.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: avoid_dynamic_calls 2 | 3 | import "package:clay_containers/clay_containers.dart"; 4 | import "package:flutter/material.dart"; 5 | import "package:provider/provider.dart"; 6 | import "package:rsa_algorithm/src/configs/palette.dart"; 7 | import "package:rsa_algorithm/src/methods/requests.dart"; 8 | import "package:rsa_algorithm/src/screens/widgets/avatar_name.dart"; 9 | import "package:rsa_algorithm/src/state_management/provider.dart"; 10 | 11 | class MsgField extends StatefulWidget { 12 | // if true then I'm Raghad , else I'm Donia 13 | final bool isSender; 14 | final Color mainColor; 15 | final String id; 16 | final int maxLength; 17 | const MsgField({ 18 | required this.id, 19 | required this.isSender, 20 | required this.mainColor, 21 | required this.maxLength, 22 | Key? key, 23 | }) : super(key: key); 24 | 25 | @override 26 | State createState() => _MsgFieldState(); 27 | } 28 | 29 | class _MsgFieldState extends State { 30 | TextEditingController? _textEditingController; 31 | @override 32 | void initState() { 33 | _textEditingController= TextEditingController(); 34 | super.initState(); 35 | } 36 | @override 37 | void dispose() { 38 | _textEditingController!.dispose(); 39 | super.dispose(); 40 | } 41 | @override 42 | Widget build(BuildContext context) => Padding( 43 | padding: const EdgeInsets.symmetric(horizontal: 32), 44 | child: Row( 45 | crossAxisAlignment: CrossAxisAlignment.start, 46 | children: [ 47 | AvatarName(isSender: widget.isSender, 48 | showName: true, 49 | ), 50 | const SizedBox(width: 32,), 51 | Expanded( 52 | child: Padding( 53 | padding: const EdgeInsets.only(top: 16.0), 54 | child: ClayContainer( 55 | color: backGround, 56 | depth: 5, 57 | width: MediaQuery.of(context).size.width, 58 | child: Row( 59 | crossAxisAlignment: 60 | CrossAxisAlignment.end, 61 | children: [ 62 | Expanded( 63 | child: Padding( 64 | padding: const EdgeInsets.all(16.0), 65 | child: TextField( 66 | controller: _textEditingController, 67 | cursorHeight: 24, 68 | maxLines: 5, 69 | maxLength: widget.maxLength, 70 | cursorColor: widget.mainColor, 71 | style: TextStyle( 72 | color: Colors.white.withOpacity(0.8), 73 | fontFamily: "roboto-mono", 74 | fontSize: 18 75 | ), 76 | decoration: InputDecoration( 77 | helperStyle: TextStyle(color: widget.mainColor), 78 | enabledBorder: const UnderlineInputBorder( 79 | borderSide: BorderSide 80 | (color: Colors.transparent) 81 | ), 82 | focusedBorder: const UnderlineInputBorder( 83 | borderSide: BorderSide 84 | (color: Colors.transparent) 85 | ) 86 | ), 87 | ), 88 | ), 89 | ), 90 | Padding( 91 | padding: const EdgeInsets.all(8.0), 92 | child: FloatingActionButton( 93 | heroTag: widget.id, 94 | onPressed: ()async{ 95 | if(widget.isSender) { 96 | List res = await 97 | Future.wait(> 98 | [doniaRecMessage(), 99 | raghadSendMessage(_textEditingController!.text)]); 100 | _textEditingController!.clear(); 101 | Provider.of(context, listen: false).sentFromRaghad( 102 | res[1]["message_sent"].toString(), 103 | res[1]["message_sent_encrypted"].toString(), 104 | ); 105 | Provider.of(context, listen: false) 106 | .receivedToDonia( 107 | res[0]["message_recieved_decrypted"].toString(), 108 | res[0]["message_recieved_encrypted"].toString(), 109 | ); 110 | } 111 | else{ 112 | List res = await 113 | Future.wait(> 114 | [raghadRecMessage(), 115 | doniaSendMessage(_textEditingController!.text)]); 116 | _textEditingController!.clear(); 117 | Provider.of(context, listen: false).sentFromDonia( 118 | res[1]["message_sent"].toString(), 119 | res[1]["message_sent_encrypted"].toString(), 120 | ); 121 | Provider.of(context, listen: false) 122 | .receivedToRaghad( 123 | res[0]["message_recieved_decrypted"].toString(), 124 | res[0]["message_recieved_encrypted"].toString(), 125 | ); 126 | } 127 | 128 | }, 129 | child: 130 | const Icon(Icons.send, 131 | color:backGround,size: 25,), 132 | backgroundColor: widget.mainColor, 133 | foregroundColor: backGround, 134 | 135 | ), 136 | ) 137 | ], 138 | ), 139 | ), 140 | ), 141 | ), 142 | ], 143 | ), 144 | ); 145 | } 146 | -------------------------------------------------------------------------------- /lib/src/screens/view/communicate.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: lines_longer_than_80_chars, always_specify_types 2 | 3 | import "package:bitsdojo_window/bitsdojo_window.dart"; 4 | import "package:clay_containers/clay_containers.dart"; 5 | import "package:flutter/material.dart"; 6 | import "package:provider/provider.dart"; 7 | import "package:rsa_algorithm/src/configs/palette.dart"; 8 | import "package:rsa_algorithm/src/screens/view/main_screen.dart"; 9 | import "package:rsa_algorithm/src/screens/widgets/chat_section.dart"; 10 | import "package:rsa_algorithm/src/screens/widgets/reciever_chat.dart"; 11 | import "package:rsa_algorithm/src/screens/widgets/sender_chat.dart"; 12 | import "package:rsa_algorithm/src/screens/widgets/titleBar.dart"; 13 | import "package:rsa_algorithm/src/state_management/provider.dart"; 14 | 15 | class Communicate extends StatefulWidget { 16 | final int maxMsgLengthDonia; 17 | final int maxMsgLengthRaghad; 18 | const Communicate({ 19 | required this.maxMsgLengthRaghad, 20 | required this.maxMsgLengthDonia, 21 | Key? key}) : super(key: key); 22 | 23 | @override 24 | _CommunicateState createState() => _CommunicateState(); 25 | } 26 | 27 | class _CommunicateState extends State { 28 | Map>? atRaghad; 29 | List? encAtRaghad; 30 | Map>? atDonia; 31 | List? encAtDonia; 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | atDonia= Provider.of(context, listen: true).atDonia; 36 | encAtDonia= 37 | Provider.of(context, listen: true).atDoniaEnc; 38 | 39 | atRaghad= Provider.of(context, listen: true).atRaghad; 40 | encAtRaghad= 41 | Provider.of(context, listen: true).atRaghadEnc; 42 | 43 | 44 | return Scaffold( 45 | body: Column( 46 | children: [ 47 | WindowTitleBarBox( 48 | child: Row( 49 | children: [ 50 | Expanded( 51 | child: Row( 52 | children: [ 53 | Padding( 54 | padding: const EdgeInsets.all(2.0), 55 | child: Image.asset("assets/logos/logo2.png",width: 30,), 56 | ), 57 | 58 | ], 59 | ), 60 | ), 61 | Expanded( 62 | child: Row( 63 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 64 | children: [ 65 | 66 | 67 | Expanded(child: MoveWindow()), 68 | WindowButtons() 69 | ]), 70 | ), 71 | ], 72 | )), 73 | Expanded( 74 | child: Row( 75 | children: [ 76 | Expanded( 77 | child: ChatSection( 78 | maxMessageLength: widget.maxMsgLengthDonia, 79 | isSender: true, 80 | messageWidgets: encAtRaghad!.map((String enc) => 81 | atRaghad! 82 | [encAtRaghad!.indexOf(enc)]![0]=="sent"? 83 | Raghad(sent:true, 84 | msg: atRaghad! 85 | [encAtRaghad!.indexOf(enc)]![1], 86 | encrypted:enc):Donia( 87 | sent: false, 88 | msg: atRaghad! 89 | [encAtRaghad!.indexOf(enc)]![1], 90 | encrypted:enc 91 | ) 92 | ).toList(), 93 | ), 94 | ), 95 | Expanded( 96 | child: ChatSection( 97 | maxMessageLength: widget.maxMsgLengthRaghad, 98 | isSender: false, 99 | messageWidgets: encAtDonia!.map((String enc) => 100 | atDonia! 101 | [encAtDonia!.indexOf(enc)]![0]=="rec"? 102 | Raghad( 103 | sent: false, 104 | msg: atDonia! 105 | [encAtDonia!.indexOf(enc)]![1], 106 | encrypted:enc):Donia( 107 | sent: true, 108 | msg: atDonia! 109 | [encAtDonia!.indexOf(enc)]![1], 110 | encrypted:enc 111 | ) 112 | ).toList(), 113 | ), 114 | ), 115 | ], 116 | ), 117 | ), 118 | Row( 119 | mainAxisAlignment: MainAxisAlignment.center, 120 | 121 | children: [ 122 | Padding( 123 | padding: const EdgeInsets.only(bottom: 20), 124 | child:ClayContainer( 125 | color: backGround, 126 | curveType: CurveType.concave, 127 | depth: 10, 128 | borderRadius: 30, 129 | child: TextButton( 130 | onPressed: (){ 131 | Navigator.pop(context); 132 | }, 133 | style: ButtonStyle( 134 | shape: MaterialStateProperty.all(const StadiumBorder()), 135 | foregroundColor:MaterialStateProperty.all(grad1) , 136 | ), 137 | // ignore: prefer_const_constructors 138 | child: Padding( 139 | padding:const EdgeInsets.all(15.0), 140 | child: const Text("Change P , Q", 141 | style:TextStyle( 142 | fontSize: 18 143 | ),), 144 | ), 145 | ), 146 | ) 147 | ), 148 | const SizedBox(width: 50,), 149 | Padding( 150 | padding: const EdgeInsets.only(bottom: 20), 151 | child:ClayContainer( 152 | color: backGround, 153 | curveType: CurveType.concave, 154 | depth: 10, 155 | borderRadius: 30, 156 | child: TextButton( 157 | onPressed: (){ 158 | Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (BuildContext context)=> 159 | const MainScreen()), (Route route) => false); 160 | }, 161 | style: ButtonStyle( 162 | shape: MaterialStateProperty.all(const StadiumBorder()), 163 | foregroundColor:MaterialStateProperty.all(grad1) , 164 | ), 165 | // ignore: prefer_const_constructors 166 | child: Padding( 167 | padding:const EdgeInsets.all(15.0), 168 | child: const Text("Back to Home", 169 | style:TextStyle( 170 | fontSize: 18 171 | ),), 172 | ), 173 | ), 174 | ) 175 | ), 176 | ], 177 | ), 178 | 179 | ], 180 | ), 181 | ); 182 | } 183 | } 184 | 185 | 186 | 187 | -------------------------------------------------------------------------------- /windows/runner/win32_window.cpp: -------------------------------------------------------------------------------- 1 | #include "win32_window.h" 2 | 3 | #include 4 | 5 | #include "resource.h" 6 | 7 | namespace { 8 | 9 | constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; 10 | 11 | // The number of Win32Window objects that currently exist. 12 | static int g_active_window_count = 0; 13 | 14 | using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); 15 | 16 | // Scale helper to convert logical scaler values to physical using passed in 17 | // scale factor 18 | int Scale(int source, double scale_factor) { 19 | return static_cast(source * scale_factor); 20 | } 21 | 22 | // Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. 23 | // This API is only needed for PerMonitor V1 awareness mode. 24 | void EnableFullDpiSupportIfAvailable(HWND hwnd) { 25 | HMODULE user32_module = LoadLibraryA("User32.dll"); 26 | if (!user32_module) { 27 | return; 28 | } 29 | auto enable_non_client_dpi_scaling = 30 | reinterpret_cast( 31 | GetProcAddress(user32_module, "EnableNonClientDpiScaling")); 32 | if (enable_non_client_dpi_scaling != nullptr) { 33 | enable_non_client_dpi_scaling(hwnd); 34 | FreeLibrary(user32_module); 35 | } 36 | } 37 | 38 | } // namespace 39 | 40 | // Manages the Win32Window's window class registration. 41 | class WindowClassRegistrar { 42 | public: 43 | ~WindowClassRegistrar() = default; 44 | 45 | // Returns the singleton registar instance. 46 | static WindowClassRegistrar* GetInstance() { 47 | if (!instance_) { 48 | instance_ = new WindowClassRegistrar(); 49 | } 50 | return instance_; 51 | } 52 | 53 | // Returns the name of the window class, registering the class if it hasn't 54 | // previously been registered. 55 | const wchar_t* GetWindowClass(); 56 | 57 | // Unregisters the window class. Should only be called if there are no 58 | // instances of the window. 59 | void UnregisterWindowClass(); 60 | 61 | private: 62 | WindowClassRegistrar() = default; 63 | 64 | static WindowClassRegistrar* instance_; 65 | 66 | bool class_registered_ = false; 67 | }; 68 | 69 | WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; 70 | 71 | const wchar_t* WindowClassRegistrar::GetWindowClass() { 72 | if (!class_registered_) { 73 | WNDCLASS window_class{}; 74 | window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); 75 | window_class.lpszClassName = kWindowClassName; 76 | window_class.style = CS_HREDRAW | CS_VREDRAW; 77 | window_class.cbClsExtra = 0; 78 | window_class.cbWndExtra = 0; 79 | window_class.hInstance = GetModuleHandle(nullptr); 80 | window_class.hIcon = 81 | LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); 82 | window_class.hbrBackground = 0; 83 | window_class.lpszMenuName = nullptr; 84 | window_class.lpfnWndProc = Win32Window::WndProc; 85 | RegisterClass(&window_class); 86 | class_registered_ = true; 87 | } 88 | return kWindowClassName; 89 | } 90 | 91 | void WindowClassRegistrar::UnregisterWindowClass() { 92 | UnregisterClass(kWindowClassName, nullptr); 93 | class_registered_ = false; 94 | } 95 | 96 | Win32Window::Win32Window() { 97 | ++g_active_window_count; 98 | } 99 | 100 | Win32Window::~Win32Window() { 101 | --g_active_window_count; 102 | Destroy(); 103 | } 104 | 105 | bool Win32Window::CreateAndShow(const std::wstring& title, 106 | const Point& origin, 107 | const Size& size) { 108 | Destroy(); 109 | 110 | const wchar_t* window_class = 111 | WindowClassRegistrar::GetInstance()->GetWindowClass(); 112 | 113 | const POINT target_point = {static_cast(origin.x), 114 | static_cast(origin.y)}; 115 | HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); 116 | UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); 117 | double scale_factor = dpi / 96.0; 118 | 119 | HWND window = CreateWindow( 120 | window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE, 121 | Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), 122 | Scale(size.width, scale_factor), Scale(size.height, scale_factor), 123 | nullptr, nullptr, GetModuleHandle(nullptr), this); 124 | 125 | if (!window) { 126 | return false; 127 | } 128 | 129 | return OnCreate(); 130 | } 131 | 132 | // static 133 | LRESULT CALLBACK Win32Window::WndProc(HWND const window, 134 | UINT const message, 135 | WPARAM const wparam, 136 | LPARAM const lparam) noexcept { 137 | if (message == WM_NCCREATE) { 138 | auto window_struct = reinterpret_cast(lparam); 139 | SetWindowLongPtr(window, GWLP_USERDATA, 140 | reinterpret_cast(window_struct->lpCreateParams)); 141 | 142 | auto that = static_cast(window_struct->lpCreateParams); 143 | EnableFullDpiSupportIfAvailable(window); 144 | that->window_handle_ = window; 145 | } else if (Win32Window* that = GetThisFromHandle(window)) { 146 | return that->MessageHandler(window, message, wparam, lparam); 147 | } 148 | 149 | return DefWindowProc(window, message, wparam, lparam); 150 | } 151 | 152 | LRESULT 153 | Win32Window::MessageHandler(HWND hwnd, 154 | UINT const message, 155 | WPARAM const wparam, 156 | LPARAM const lparam) noexcept { 157 | switch (message) { 158 | case WM_DESTROY: 159 | window_handle_ = nullptr; 160 | Destroy(); 161 | if (quit_on_close_) { 162 | PostQuitMessage(0); 163 | } 164 | return 0; 165 | 166 | case WM_DPICHANGED: { 167 | auto newRectSize = reinterpret_cast(lparam); 168 | LONG newWidth = newRectSize->right - newRectSize->left; 169 | LONG newHeight = newRectSize->bottom - newRectSize->top; 170 | 171 | SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, 172 | newHeight, SWP_NOZORDER | SWP_NOACTIVATE); 173 | 174 | return 0; 175 | } 176 | case WM_SIZE: { 177 | RECT rect = GetClientArea(); 178 | if (child_content_ != nullptr) { 179 | // Size and position the child window. 180 | MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, 181 | rect.bottom - rect.top, TRUE); 182 | } 183 | return 0; 184 | } 185 | 186 | case WM_ACTIVATE: 187 | if (child_content_ != nullptr) { 188 | SetFocus(child_content_); 189 | } 190 | return 0; 191 | } 192 | 193 | return DefWindowProc(window_handle_, message, wparam, lparam); 194 | } 195 | 196 | void Win32Window::Destroy() { 197 | OnDestroy(); 198 | 199 | if (window_handle_) { 200 | DestroyWindow(window_handle_); 201 | window_handle_ = nullptr; 202 | } 203 | if (g_active_window_count == 0) { 204 | WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); 205 | } 206 | } 207 | 208 | Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { 209 | return reinterpret_cast( 210 | GetWindowLongPtr(window, GWLP_USERDATA)); 211 | } 212 | 213 | void Win32Window::SetChildContent(HWND content) { 214 | child_content_ = content; 215 | SetParent(content, window_handle_); 216 | RECT frame = GetClientArea(); 217 | 218 | MoveWindow(content, frame.left, frame.top, frame.right - frame.left, 219 | frame.bottom - frame.top, true); 220 | 221 | SetFocus(child_content_); 222 | } 223 | 224 | RECT Win32Window::GetClientArea() { 225 | RECT frame; 226 | GetClientRect(window_handle_, &frame); 227 | return frame; 228 | } 229 | 230 | HWND Win32Window::GetHandle() { 231 | return window_handle_; 232 | } 233 | 234 | void Win32Window::SetQuitOnClose(bool quit_on_close) { 235 | quit_on_close_ = quit_on_close; 236 | } 237 | 238 | bool Win32Window::OnCreate() { 239 | // No-op; provided for subclasses. 240 | return true; 241 | } 242 | 243 | void Win32Window::OnDestroy() { 244 | // No-op; provided for subclasses. 245 | } 246 | -------------------------------------------------------------------------------- /lib/src/screens/widgets/chat_section.dart: -------------------------------------------------------------------------------- 1 | 2 | // ignore_for_file: lines_longer_than_80_chars, flutter_style_todos, always_specify_types, non_constant_identifier_names 3 | 4 | import "package:clay_containers/clay_containers.dart"; 5 | import "package:flutter/material.dart"; 6 | import "package:rsa_algorithm/src/configs/keys.dart"; 7 | import "package:rsa_algorithm/src/configs/palette.dart"; 8 | import "package:rsa_algorithm/src/screens/widgets/avatar_name.dart"; 9 | import "package:rsa_algorithm/src/screens/widgets/msg_field.dart"; 10 | 11 | 12 | // ignore: must_be_immutable 13 | class ChatSection extends StatefulWidget { 14 | /// true if sender, false if receiver 15 | final bool isSender; 16 | /// list of messages 17 | List messageWidgets; 18 | /// max text field input length 19 | final int maxMessageLength; 20 | ChatSection({ 21 | required this.messageWidgets, 22 | required this.isSender, 23 | required this.maxMessageLength, 24 | Key? key, 25 | }) : super(key: key); 26 | 27 | @override 28 | State createState() => _ChatSectionState(); 29 | } 30 | 31 | class _ChatSectionState extends State { 32 | ScrollController? _scrollController; 33 | 34 | String? e_pu; 35 | String? n; 36 | String? d_pr; 37 | String? name; 38 | @override 39 | void initState() { 40 | _scrollController= ScrollController(); 41 | name= widget.isSender?"Raghad":"Donia"; 42 | // TODO: implement initState 43 | super.initState(); 44 | } 45 | 46 | @override 47 | void dispose() { 48 | // TODO: implement dispose 49 | _scrollController!.dispose(); 50 | super.dispose(); 51 | } 52 | 53 | @override 54 | Widget build(BuildContext context) { 55 | e_pu= widget.isSender?e_raghad: 56 | e_donia 57 | ; 58 | n= widget.isSender?n_raghad: 59 | n_donia 60 | ; 61 | d_pr= widget.isSender?d_raghad: 62 | e_donia 63 | ; 64 | WidgetsBinding.instance.addPostFrameCallback((_) { 65 | if(_scrollController!.hasClients){ 66 | _scrollController!.animateTo(_scrollController! 67 | .position.maxScrollExtent, 68 | duration: const Duration(milliseconds: 500), 69 | curve: Curves.ease); 70 | } 71 | }); 72 | 73 | Color mainColor= widget.isSender?grad1:grad2; 74 | return Column( 75 | children: [ 76 | 77 | Expanded( 78 | child: Padding(padding: 79 | const EdgeInsets.all(32), 80 | child: ClayContainer( 81 | height: MediaQuery.of(context).size.height, 82 | color: backGround, 83 | borderRadius: 0, 84 | depth: 5, 85 | spread: 13, 86 | child: Column( 87 | children: [ 88 | Row( 89 | mainAxisAlignment: MainAxisAlignment.start, 90 | children: [ 91 | AvatarName(isSender: widget.isSender, 92 | showName: false, 93 | ), 94 | Expanded( 95 | child: Padding( 96 | padding: const EdgeInsets.all(16.0), 97 | child: Text( 98 | widget.isSender? 99 | "Raghad": 100 | "Donia", 101 | style: TextStyle( 102 | fontSize: 24, 103 | color: mainColor 104 | ),), 105 | ), 106 | ), 107 | Padding( 108 | padding: const EdgeInsets.only(right: 18.0), 109 | child: FloatingActionButton(onPressed: ()=> showDialog( 110 | context: context, 111 | builder: (BuildContext ctx) => AlertDialog( 112 | shape: const RoundedRectangleBorder( 113 | borderRadius: BorderRadius.all(Radius.circular(20)) 114 | ), 115 | backgroundColor: widget.isSender?grad1:grad3, 116 | title: Center(child: ClayContainer( 117 | color: backGround, 118 | emboss: true, 119 | depth: 15, 120 | spread: 0, 121 | borderRadius: 80, 122 | child: Padding( 123 | padding: const EdgeInsets.all(15.0), 124 | child: Image.asset(widget.isSender?"assets/images/sender.png" 125 | :"assets/images/reciever.png",width: 60,), 126 | ))), 127 | content: SingleChildScrollView( 128 | controller: ScrollController(), 129 | child: Padding( 130 | padding: const EdgeInsets.all(18.0), 131 | child: Column( 132 | mainAxisSize: MainAxisSize.min, 133 | crossAxisAlignment: CrossAxisAlignment.start, 134 | children: [ 135 | Column( 136 | crossAxisAlignment: CrossAxisAlignment.start, 137 | children: [ 138 | Text("${name!}'s PU key (e)", 139 | style: const TextStyle(color: backGround),), 140 | const SizedBox(height: 20,), 141 | ClayContainer( 142 | color: widget.isSender?grad1:grad3, 143 | borderRadius: 10, 144 | width: MediaQuery.of(context).size.width/4, 145 | child: Padding( 146 | padding: const EdgeInsets.all(8.0), 147 | child: Text(e_pu!, 148 | style: const TextStyle(color: Colors.white),), 149 | ), 150 | emboss: true, 151 | ), 152 | 153 | 154 | ], 155 | ), 156 | const SizedBox(height: 30,), 157 | Column( 158 | crossAxisAlignment: CrossAxisAlignment.start, 159 | children: [ 160 | Text("${name!}'s n", 161 | style: const TextStyle(color: backGround),), 162 | const SizedBox(height: 20,), 163 | ClayContainer( 164 | color: widget.isSender?grad1:grad3, 165 | borderRadius: 10, 166 | width: MediaQuery.of(context).size.width/4, 167 | child: Padding( 168 | padding: const EdgeInsets.all(8.0), 169 | child: Text(n!, 170 | style: const TextStyle(color: Colors.white),), 171 | ), 172 | emboss: true, 173 | ), 174 | 175 | 176 | ], 177 | ), 178 | const SizedBox(height: 30,), 179 | 180 | Column( 181 | crossAxisAlignment: CrossAxisAlignment.start, 182 | children: [ 183 | Text("${name!}'s PR key (d)", 184 | style: const TextStyle(color: backGround),), 185 | const SizedBox(height: 20,), 186 | ClayContainer( 187 | color: widget.isSender?grad1:grad3, 188 | borderRadius: 10, 189 | width: MediaQuery.of(context).size.width/4, 190 | child: Padding( 191 | padding: const EdgeInsets.all(8.0), 192 | child: Text(d_pr!, 193 | style: const TextStyle(color: Colors.white),), 194 | ), 195 | emboss: true, 196 | ), 197 | 198 | 199 | ], 200 | ), 201 | ], 202 | ), 203 | ), 204 | ), 205 | actions: [ 206 | ElevatedButton( 207 | onPressed: () { 208 | Navigator.of(ctx).pop(); 209 | }, 210 | style: ButtonStyle( 211 | backgroundColor: MaterialStateProperty.all(backGround) 212 | ), 213 | child: Text("Done", 214 | style: TextStyle(color: widget.isSender?grad1:grad3),), 215 | ), 216 | ], 217 | ), 218 | ), 219 | heroTag: Key("${widget.isSender}"), 220 | elevation: 15, 221 | backgroundColor: widget.isSender?grad1: 222 | grad2, 223 | child: const Icon(Icons.vpn_key, 224 | color: backGround,), 225 | ), 226 | ) 227 | 228 | ], 229 | ), 230 | Divider(thickness: 2, 231 | height: 5, 232 | color: mainColor,), 233 | Expanded( 234 | child: Padding( 235 | padding: const EdgeInsets.only( 236 | bottom: 32.0, 237 | left: 32.0, 238 | right: 32.0), 239 | child: Column( 240 | children: [ 241 | Expanded( 242 | child: SingleChildScrollView( 243 | controller: _scrollController, 244 | child: Padding( 245 | padding: const EdgeInsets.all(8.0), 246 | child: Column( 247 | children:widget.messageWidgets 248 | ), 249 | ), 250 | ), 251 | ), 252 | MsgField( 253 | maxLength:widget.maxMessageLength, 254 | mainColor: mainColor, 255 | isSender: widget.isSender, 256 | id:widget.isSender?"1":"2", 257 | ) 258 | ], 259 | ), 260 | ), 261 | ), 262 | ], 263 | ), 264 | ) 265 | ), 266 | ), 267 | 268 | ], 269 | ); 270 | } 271 | } 272 | 273 | 274 | -------------------------------------------------------------------------------- /lib/src/screens/view/plot.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: always_specify_types, lines_longer_than_80_chars 2 | 3 | import "dart:math"; 4 | 5 | import "package:bitsdojo_window/bitsdojo_window.dart"; 6 | import "package:clay_containers/clay_containers.dart"; 7 | import "package:flutter/material.dart"; 8 | import "package:fl_chart/fl_chart.dart"; 9 | import "package:flutter_neumorphic/flutter_neumorphic.dart"; 10 | import "package:rsa_algorithm/src/configs/palette.dart"; 11 | import "package:rsa_algorithm/src/screens/widgets/titleBar.dart"; 12 | class EncrytionStatistics extends StatefulWidget { 13 | final bool isAttack; 14 | final List attackTimes; 15 | final List nValues; 16 | final List nBitSizes; 17 | const EncrytionStatistics({ 18 | required this.isAttack, 19 | required this.attackTimes, 20 | required this.nValues, 21 | required this.nBitSizes, 22 | Key? key}) : super(key: key); 23 | 24 | @override 25 | _EncrytionStatisticsState createState() => _EncrytionStatisticsState(); 26 | } 27 | 28 | class _EncrytionStatisticsState extends State { 29 | /// Assumes the given path is a text-file-asset. 30 | 31 | 32 | @override 33 | void initState() { 34 | super.initState(); 35 | 36 | } 37 | @override 38 | Widget build(BuildContext context) => Scaffold( 39 | body: SafeArea( 40 | child: Center( 41 | child: Column( 42 | children: [ 43 | WindowTitleBarBox( 44 | child: Row( 45 | children: [ 46 | Expanded( 47 | child: Row( 48 | children: [ 49 | Padding( 50 | padding: const EdgeInsets.all(2.0), 51 | child: Image.asset("assets/logos/logo2.png",width: 30,), 52 | ), 53 | 54 | ], 55 | ), 56 | ), 57 | Expanded( 58 | child: Row( 59 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 60 | children: [ 61 | 62 | 63 | Expanded(child: MoveWindow()), 64 | WindowButtons() 65 | ]), 66 | ), 67 | ], 68 | )), 69 | Padding( 70 | padding: const EdgeInsets.all(8.0), 71 | child: Text(widget.isAttack?"Mathematical Attack Efficiency": 72 | "RSA Encryption Efficiency", 73 | textScaleFactor: 1.5, 74 | style: const TextStyle( 75 | color: grad3 76 | ), 77 | ), 78 | ), 79 | Expanded( 80 | child: Row( 81 | children: [ 82 | Expanded( 83 | child: Padding( 84 | padding: const EdgeInsets.all(38.0), 85 | child: LineChart( 86 | LineChartData( 87 | gridData: FlGridData( 88 | show: true, 89 | drawVerticalLine: true, 90 | getDrawingHorizontalLine: (double value) => FlLine( 91 | color: const Color(0xff37434d).withOpacity(0.5), 92 | strokeWidth: 1, 93 | ), 94 | getDrawingVerticalLine: (double value) => FlLine( 95 | color: const Color(0xff37434d), 96 | strokeWidth: 0, 97 | ), 98 | ), 99 | maxY: widget.isAttack?5500:0.025, 100 | titlesData: FlTitlesData( 101 | 102 | show: true, 103 | bottomTitles:AxisTitles( 104 | axisNameWidget: Text(widget.isAttack?"Key values (Decimal)": 105 | "Key length (Bits)", 106 | style: const TextStyle( 107 | color: Colors.white, 108 | fontSize: 16, 109 | ), 110 | ), 111 | sideTitles: SideTitles( 112 | showTitles: true, 113 | //interval: widget.isAttack?8:128, 114 | 115 | getTitlesWidget: (double value, TitleMeta meta) => Padding( 116 | padding: const EdgeInsets.only(top: 18.0), 117 | child:widget.isAttack?RotatedBox( 118 | quarterTurns: 1, 119 | child: Text(widget.nValues[((value.toInt()-8)~/2)].toString(), 120 | textAlign: TextAlign.left, 121 | style: const TextStyle(color: grad2),), 122 | ): 123 | Transform.rotate(angle: -pi/4, 124 | child: Text( 125 | value.toInt().toString(), 126 | textAlign: TextAlign.left, 127 | style: const TextStyle(color: grad2),), 128 | ), 129 | ), 130 | reservedSize: widget.isAttack? 310: 131 | 80, 132 | ),), 133 | leftTitles: AxisTitles( 134 | axisNameWidget: const Text("Execution Time (Seconds)", 135 | style: TextStyle( 136 | color: Colors.white, 137 | fontSize: 16, 138 | ), 139 | ), 140 | sideTitles: SideTitles( 141 | showTitles: true, 142 | 143 | getTitlesWidget: (double value, TitleMeta meta) => Padding( 144 | padding: const EdgeInsets.only(left: 18.0), 145 | child: Text(value.toStringAsFixed(widget.isAttack?0:3), 146 | style: const TextStyle(color: grad1),), 147 | ), 148 | reservedSize: 100, 149 | 150 | )), 151 | rightTitles: AxisTitles(sideTitles: 152 | SideTitles(showTitles: false,), 153 | 154 | ) 155 | , 156 | topTitles: AxisTitles(sideTitles: 157 | SideTitles(showTitles: false)) 158 | ), 159 | borderData: 160 | FlBorderData(show: true, 161 | border: Border.all(color: const Color(0xff37434d), 162 | width: 1)), 163 | 164 | lineBarsData: [ 165 | LineChartBarData( 166 | spots: 167 | widget.nBitSizes.map((e) => FlSpot((e).toDouble(), 168 | double.parse(widget.attackTimes[widget.nBitSizes.indexOf(e)])), ).toList(), 169 | isCurved: false, 170 | gradient: const LinearGradient( 171 | colors: [grad1, grad2] 172 | ), 173 | barWidth: 5, 174 | isStrokeCapRound: false, 175 | dotData: FlDotData( 176 | show: true, 177 | ), 178 | belowBarData: BarAreaData( 179 | show: false, 180 | gradient: const LinearGradient( 181 | colors: [grad1, grad2] 182 | ), 183 | ), 184 | ), 185 | ], 186 | ) 187 | ), 188 | ), 189 | ), 190 | Expanded(child: Padding( 191 | padding: const EdgeInsets.only(left: 30.0, 192 | bottom: 30.0, 193 | top: 30.0, 194 | right: 60), 195 | child: Container( 196 | decoration: BoxDecoration( 197 | gradient: const LinearGradient( 198 | colors: [ 199 | grad1, 200 | grad2 201 | ], 202 | begin: Alignment.topLeft, 203 | end: Alignment.bottomLeft, 204 | ), 205 | boxShadow: [ 206 | BoxShadow( 207 | color: grad1.withOpacity(0.1), 208 | blurRadius: 10, 209 | offset: const Offset(0, 6) 210 | ), 211 | BoxShadow( 212 | color: grad2.withOpacity(0.1), 213 | blurRadius: 10, 214 | offset: const Offset(0, -6) 215 | ) 216 | ] 217 | ), 218 | child: Padding( 219 | padding: const EdgeInsets.only(left: 5.0,), 220 | child: ClayContainer( 221 | 222 | color: backGround, 223 | curveType: CurveType.concave, 224 | depth: 10, 225 | borderRadius: 0, 226 | spread: 0, 227 | child: Padding( 228 | padding: const EdgeInsets.symmetric(horizontal: 16.0, 229 | vertical: 18.0), 230 | child: SingleChildScrollView( 231 | child: Column( 232 | children: [ 233 | Row( 234 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 235 | children: const [ 236 | Text("Key Size (in Bits)", 237 | style: TextStyle( 238 | fontFamily: "roboto-mono", 239 | fontWeight: FontWeight.bold, 240 | color: grad1, 241 | fontSize: 24 242 | ), 243 | ), 244 | Text("Execution time (in seconds)", 245 | style: TextStyle( 246 | fontFamily: "roboto-mono", 247 | fontWeight: FontWeight.bold, 248 | color: grad2, 249 | fontSize: 24 250 | ), 251 | ) 252 | ],), 253 | Divider(color: Colors.grey.withOpacity(0.2), 254 | thickness: 2, 255 | height: 30, 256 | ), 257 | Column( 258 | children: widget.nBitSizes.map((e) => 259 | Column( 260 | crossAxisAlignment: CrossAxisAlignment.center, 261 | children: [ 262 | Row( 263 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 264 | children: [ 265 | Text(e.toString(), 266 | style: const TextStyle( 267 | fontFamily: "roboto-mono", 268 | fontWeight: FontWeight.bold, 269 | color: Colors.white, 270 | fontSize: 16 271 | ), 272 | ), 273 | Text(widget.attackTimes[ 274 | widget.nBitSizes.indexOf(e) 275 | ], 276 | style: const TextStyle( 277 | fontFamily: "roboto-mono", 278 | fontWeight: FontWeight.bold, 279 | color: Colors.white, 280 | fontSize: 16 281 | ), 282 | ), 283 | ],), 284 | Divider(color: Colors.grey.withOpacity(0.2), 285 | thickness: 2, 286 | height: 30, 287 | ), 288 | ], 289 | ), 290 | ).toList(), 291 | ) 292 | 293 | ], 294 | ), 295 | ), 296 | ), 297 | ), 298 | ), 299 | ), 300 | )) 301 | ], 302 | ), 303 | ), 304 | Padding( 305 | padding: const EdgeInsets.symmetric(vertical: 50.0), 306 | child: ClayContainer( 307 | color: backGround, 308 | curveType: CurveType.concave, 309 | depth: 10, 310 | borderRadius: 30, 311 | child: ClipRRect( 312 | borderRadius: const BorderRadius.all( 313 | Radius.circular(30 314 | ) 315 | ), 316 | child: TextButton(onPressed: (){ 317 | Navigator.pop(context); 318 | }, 319 | child:const Padding( 320 | padding: EdgeInsets.symmetric(horizontal: 26.0, 321 | vertical: 18), 322 | child: Text("Back",textScaleFactor: 1.5,), 323 | ) 324 | ), 325 | ), 326 | ), 327 | ) 328 | 329 | ], 330 | ), 331 | ), 332 | ), 333 | 334 | );} 335 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXCopyFilesBuildPhase section */ 19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 20 | isa = PBXCopyFilesBuildPhase; 21 | buildActionMask = 2147483647; 22 | dstPath = ""; 23 | dstSubfolderSpec = 10; 24 | files = ( 25 | ); 26 | name = "Embed Frameworks"; 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 9740EEB11CF90186004384FC /* Flutter */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 65 | ); 66 | name = Flutter; 67 | sourceTree = ""; 68 | }; 69 | 97C146E51CF9000F007C117D = { 70 | isa = PBXGroup; 71 | children = ( 72 | 9740EEB11CF90186004384FC /* Flutter */, 73 | 97C146F01CF9000F007C117D /* Runner */, 74 | 97C146EF1CF9000F007C117D /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 97C146EF1CF9000F007C117D /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 97C146EE1CF9000F007C117D /* Runner.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 97C146F01CF9000F007C117D /* Runner */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 92 | 97C147021CF9000F007C117D /* Info.plist */, 93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 97 | ); 98 | path = Runner; 99 | sourceTree = ""; 100 | }; 101 | /* End PBXGroup section */ 102 | 103 | /* Begin PBXNativeTarget section */ 104 | 97C146ED1CF9000F007C117D /* Runner */ = { 105 | isa = PBXNativeTarget; 106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 107 | buildPhases = ( 108 | 9740EEB61CF901F6004384FC /* Run Script */, 109 | 97C146EA1CF9000F007C117D /* Sources */, 110 | 97C146EB1CF9000F007C117D /* Frameworks */, 111 | 97C146EC1CF9000F007C117D /* Resources */, 112 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 114 | ); 115 | buildRules = ( 116 | ); 117 | dependencies = ( 118 | ); 119 | name = Runner; 120 | productName = Runner; 121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 122 | productType = "com.apple.product-type.application"; 123 | }; 124 | /* End PBXNativeTarget section */ 125 | 126 | /* Begin PBXProject section */ 127 | 97C146E61CF9000F007C117D /* Project object */ = { 128 | isa = PBXProject; 129 | attributes = { 130 | LastUpgradeCheck = 1300; 131 | ORGANIZATIONNAME = ""; 132 | TargetAttributes = { 133 | 97C146ED1CF9000F007C117D = { 134 | CreatedOnToolsVersion = 7.3.1; 135 | LastSwiftMigration = 1100; 136 | }; 137 | }; 138 | }; 139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 140 | compatibilityVersion = "Xcode 9.3"; 141 | developmentRegion = en; 142 | hasScannedForEncodings = 0; 143 | knownRegions = ( 144 | en, 145 | Base, 146 | ); 147 | mainGroup = 97C146E51CF9000F007C117D; 148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 149 | projectDirPath = ""; 150 | projectRoot = ""; 151 | targets = ( 152 | 97C146ED1CF9000F007C117D /* Runner */, 153 | ); 154 | }; 155 | /* End PBXProject section */ 156 | 157 | /* Begin PBXResourcesBuildPhase section */ 158 | 97C146EC1CF9000F007C117D /* Resources */ = { 159 | isa = PBXResourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXResourcesBuildPhase section */ 170 | 171 | /* Begin PBXShellScriptBuildPhase section */ 172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 173 | isa = PBXShellScriptBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | ); 177 | inputPaths = ( 178 | ); 179 | name = "Thin Binary"; 180 | outputPaths = ( 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | shellPath = /bin/sh; 184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 185 | }; 186 | 9740EEB61CF901F6004384FC /* Run Script */ = { 187 | isa = PBXShellScriptBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | ); 191 | inputPaths = ( 192 | ); 193 | name = "Run Script"; 194 | outputPaths = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | shellPath = /bin/sh; 198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 199 | }; 200 | /* End PBXShellScriptBuildPhase section */ 201 | 202 | /* Begin PBXSourcesBuildPhase section */ 203 | 97C146EA1CF9000F007C117D /* Sources */ = { 204 | isa = PBXSourcesBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXSourcesBuildPhase section */ 213 | 214 | /* Begin PBXVariantGroup section */ 215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 216 | isa = PBXVariantGroup; 217 | children = ( 218 | 97C146FB1CF9000F007C117D /* Base */, 219 | ); 220 | name = Main.storyboard; 221 | sourceTree = ""; 222 | }; 223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 97C147001CF9000F007C117D /* Base */, 227 | ); 228 | name = LaunchScreen.storyboard; 229 | sourceTree = ""; 230 | }; 231 | /* End PBXVariantGroup section */ 232 | 233 | /* Begin XCBuildConfiguration section */ 234 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 235 | isa = XCBuildConfiguration; 236 | buildSettings = { 237 | ALWAYS_SEARCH_USER_PATHS = NO; 238 | CLANG_ANALYZER_NONNULL = YES; 239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 240 | CLANG_CXX_LIBRARY = "libc++"; 241 | CLANG_ENABLE_MODULES = YES; 242 | CLANG_ENABLE_OBJC_ARC = YES; 243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 244 | CLANG_WARN_BOOL_CONVERSION = YES; 245 | CLANG_WARN_COMMA = YES; 246 | CLANG_WARN_CONSTANT_CONVERSION = YES; 247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 249 | CLANG_WARN_EMPTY_BODY = YES; 250 | CLANG_WARN_ENUM_CONVERSION = YES; 251 | CLANG_WARN_INFINITE_RECURSION = YES; 252 | CLANG_WARN_INT_CONVERSION = YES; 253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 258 | CLANG_WARN_STRICT_PROTOTYPES = YES; 259 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 260 | CLANG_WARN_UNREACHABLE_CODE = YES; 261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 265 | ENABLE_NS_ASSERTIONS = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | GCC_C_LANGUAGE_STANDARD = gnu99; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 276 | MTL_ENABLE_DEBUG_INFO = NO; 277 | SDKROOT = iphoneos; 278 | SUPPORTED_PLATFORMS = iphoneos; 279 | TARGETED_DEVICE_FAMILY = "1,2"; 280 | VALIDATE_PRODUCT = YES; 281 | }; 282 | name = Profile; 283 | }; 284 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 285 | isa = XCBuildConfiguration; 286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 287 | buildSettings = { 288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 289 | CLANG_ENABLE_MODULES = YES; 290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 291 | ENABLE_BITCODE = NO; 292 | INFOPLIST_FILE = Runner/Info.plist; 293 | LD_RUNPATH_SEARCH_PATHS = ( 294 | "$(inherited)", 295 | "@executable_path/Frameworks", 296 | ); 297 | PRODUCT_BUNDLE_IDENTIFIER = com.example.rsaAlgorithm; 298 | PRODUCT_NAME = "$(TARGET_NAME)"; 299 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 300 | SWIFT_VERSION = 5.0; 301 | VERSIONING_SYSTEM = "apple-generic"; 302 | }; 303 | name = Profile; 304 | }; 305 | 97C147031CF9000F007C117D /* Debug */ = { 306 | isa = XCBuildConfiguration; 307 | buildSettings = { 308 | ALWAYS_SEARCH_USER_PATHS = NO; 309 | CLANG_ANALYZER_NONNULL = YES; 310 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 311 | CLANG_CXX_LIBRARY = "libc++"; 312 | CLANG_ENABLE_MODULES = YES; 313 | CLANG_ENABLE_OBJC_ARC = YES; 314 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 315 | CLANG_WARN_BOOL_CONVERSION = YES; 316 | CLANG_WARN_COMMA = YES; 317 | CLANG_WARN_CONSTANT_CONVERSION = YES; 318 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 319 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 320 | CLANG_WARN_EMPTY_BODY = YES; 321 | CLANG_WARN_ENUM_CONVERSION = YES; 322 | CLANG_WARN_INFINITE_RECURSION = YES; 323 | CLANG_WARN_INT_CONVERSION = YES; 324 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 325 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 326 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 327 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 328 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 329 | CLANG_WARN_STRICT_PROTOTYPES = YES; 330 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 331 | CLANG_WARN_UNREACHABLE_CODE = YES; 332 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 333 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 334 | COPY_PHASE_STRIP = NO; 335 | DEBUG_INFORMATION_FORMAT = dwarf; 336 | ENABLE_STRICT_OBJC_MSGSEND = YES; 337 | ENABLE_TESTABILITY = YES; 338 | GCC_C_LANGUAGE_STANDARD = gnu99; 339 | GCC_DYNAMIC_NO_PIC = NO; 340 | GCC_NO_COMMON_BLOCKS = YES; 341 | GCC_OPTIMIZATION_LEVEL = 0; 342 | GCC_PREPROCESSOR_DEFINITIONS = ( 343 | "DEBUG=1", 344 | "$(inherited)", 345 | ); 346 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 347 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 348 | GCC_WARN_UNDECLARED_SELECTOR = YES; 349 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 350 | GCC_WARN_UNUSED_FUNCTION = YES; 351 | GCC_WARN_UNUSED_VARIABLE = YES; 352 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 353 | MTL_ENABLE_DEBUG_INFO = YES; 354 | ONLY_ACTIVE_ARCH = YES; 355 | SDKROOT = iphoneos; 356 | TARGETED_DEVICE_FAMILY = "1,2"; 357 | }; 358 | name = Debug; 359 | }; 360 | 97C147041CF9000F007C117D /* Release */ = { 361 | isa = XCBuildConfiguration; 362 | buildSettings = { 363 | ALWAYS_SEARCH_USER_PATHS = NO; 364 | CLANG_ANALYZER_NONNULL = YES; 365 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 366 | CLANG_CXX_LIBRARY = "libc++"; 367 | CLANG_ENABLE_MODULES = YES; 368 | CLANG_ENABLE_OBJC_ARC = YES; 369 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 370 | CLANG_WARN_BOOL_CONVERSION = YES; 371 | CLANG_WARN_COMMA = YES; 372 | CLANG_WARN_CONSTANT_CONVERSION = YES; 373 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 374 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 375 | CLANG_WARN_EMPTY_BODY = YES; 376 | CLANG_WARN_ENUM_CONVERSION = YES; 377 | CLANG_WARN_INFINITE_RECURSION = YES; 378 | CLANG_WARN_INT_CONVERSION = YES; 379 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 380 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 381 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 382 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 383 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 384 | CLANG_WARN_STRICT_PROTOTYPES = YES; 385 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 386 | CLANG_WARN_UNREACHABLE_CODE = YES; 387 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 388 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 389 | COPY_PHASE_STRIP = NO; 390 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 391 | ENABLE_NS_ASSERTIONS = NO; 392 | ENABLE_STRICT_OBJC_MSGSEND = YES; 393 | GCC_C_LANGUAGE_STANDARD = gnu99; 394 | GCC_NO_COMMON_BLOCKS = YES; 395 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 396 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 397 | GCC_WARN_UNDECLARED_SELECTOR = YES; 398 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 399 | GCC_WARN_UNUSED_FUNCTION = YES; 400 | GCC_WARN_UNUSED_VARIABLE = YES; 401 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 402 | MTL_ENABLE_DEBUG_INFO = NO; 403 | SDKROOT = iphoneos; 404 | SUPPORTED_PLATFORMS = iphoneos; 405 | SWIFT_COMPILATION_MODE = wholemodule; 406 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 407 | TARGETED_DEVICE_FAMILY = "1,2"; 408 | VALIDATE_PRODUCT = YES; 409 | }; 410 | name = Release; 411 | }; 412 | 97C147061CF9000F007C117D /* Debug */ = { 413 | isa = XCBuildConfiguration; 414 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 415 | buildSettings = { 416 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 417 | CLANG_ENABLE_MODULES = YES; 418 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 419 | ENABLE_BITCODE = NO; 420 | INFOPLIST_FILE = Runner/Info.plist; 421 | LD_RUNPATH_SEARCH_PATHS = ( 422 | "$(inherited)", 423 | "@executable_path/Frameworks", 424 | ); 425 | PRODUCT_BUNDLE_IDENTIFIER = com.example.rsaAlgorithm; 426 | PRODUCT_NAME = "$(TARGET_NAME)"; 427 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 428 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 429 | SWIFT_VERSION = 5.0; 430 | VERSIONING_SYSTEM = "apple-generic"; 431 | }; 432 | name = Debug; 433 | }; 434 | 97C147071CF9000F007C117D /* Release */ = { 435 | isa = XCBuildConfiguration; 436 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 437 | buildSettings = { 438 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 439 | CLANG_ENABLE_MODULES = YES; 440 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 441 | ENABLE_BITCODE = NO; 442 | INFOPLIST_FILE = Runner/Info.plist; 443 | LD_RUNPATH_SEARCH_PATHS = ( 444 | "$(inherited)", 445 | "@executable_path/Frameworks", 446 | ); 447 | PRODUCT_BUNDLE_IDENTIFIER = com.example.rsaAlgorithm; 448 | PRODUCT_NAME = "$(TARGET_NAME)"; 449 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 450 | SWIFT_VERSION = 5.0; 451 | VERSIONING_SYSTEM = "apple-generic"; 452 | }; 453 | name = Release; 454 | }; 455 | /* End XCBuildConfiguration section */ 456 | 457 | /* Begin XCConfigurationList section */ 458 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 459 | isa = XCConfigurationList; 460 | buildConfigurations = ( 461 | 97C147031CF9000F007C117D /* Debug */, 462 | 97C147041CF9000F007C117D /* Release */, 463 | 249021D3217E4FDB00AE95B9 /* Profile */, 464 | ); 465 | defaultConfigurationIsVisible = 0; 466 | defaultConfigurationName = Release; 467 | }; 468 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 469 | isa = XCConfigurationList; 470 | buildConfigurations = ( 471 | 97C147061CF9000F007C117D /* Debug */, 472 | 97C147071CF9000F007C117D /* Release */, 473 | 249021D4217E4FDB00AE95B9 /* Profile */, 474 | ); 475 | defaultConfigurationIsVisible = 0; 476 | defaultConfigurationName = Release; 477 | }; 478 | /* End XCConfigurationList section */ 479 | }; 480 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 481 | } 482 | --------------------------------------------------------------------------------