MAD Lab Mini Project Report sample (1)
MAD Lab Mini Project Report sample (1)
UNIVERSITY
"Jnana Sangama", Belgaum-590 018
“Alumni Portal”
A Dissertation work submitted in partial fulfillment of the requirement
for the award of the degree
Bachelor of Engineering
In
Information Science & Engineering
Submitted by
Vishal Yadav 1AY20IS097
Sumeet 1AY20IS084
2022-23
DEPARTMENT OF INFORMATION SCIENCE &
ENGINEERING
ACHARYA INSTITUTE OF TECHNOLOGY
(AFFILIATED TO VISVESVARAYA TECHNOLOGICAL UNIVERSITY, BELAGAVI.APPROVED BY AICTE, NEW DELHI,
ACCREDITED BY NAAC, NEW DELHI)
Acharya Dr. Sarvepalli Radhakrishnan Road, Soldevanahalli, Bengaluru-560107
Certificate
This is to Certify that the Mini-Project work entitled “Alumni Portal” is a bonafide work carried out
by Vishal Yadav (1AY20IS097) and Sumeet(1AY20IS084) in partial fulfillment for the award of
the degree of Bachelor of Engineering in Information Science and Engineering of the
Visvesvaraya Technological University, Belagavi during the year 2022-23. It is certified that all
corrections/suggestions indicated for Internal Assessment have been incorporated in the Report
deposited in the departmental library. The Project has been approved as it satisfies the academic
requirements in respect of Project work prescribed for the Bachelor of Engineering Degree.
1.
2.
ACKNOWLEDGEMENT
The satisfaction that accompanies the successful completion of this mini-project would be
incomplete without the mention of the people who made it possible through constant
guidance and encouragement.
We wish to express our deepest gratitude and thanks to Prof. Kala Venugopal, Head
of the Department, Information Science and Engineering.
A warm thanks to all the faculty of the Department of Information Science and
Engineering, who have helped us with their views and encouraging ideas.
i
ABSTRACT
The rise of internet has created a major challenge for securing sensitive information sent
over the network. Several solutions have been proposed in the past to protect user
data. Encryption is the main part for the security of our data. It helps us protect our data
from other people by encrypting it using a cipher which is an algorithm used for
encrypting. We have implemented the concept of both cryptography and mobile
applications in the same environment. This has helped us learn that the symbiosis of
two different domains is possible. We have used Java for the encryption part, and we
have used XML for modifying the project in the front end and making it presentable for
the user.
ii
TABLE OF CONTENTS
Acknowledgement i
Abstract ii
1. Introduction 1
1.1 Introduction to Mobile Application Developments 1
1.1.1 What is a Mobile App? 1
1.1.2 What is Mobile OS? 2
1.1.3 Types of Mobile Apps 2
1.1.4 Different Categories of Mobile Apps 2
1.1.5 What is Mobile Application Development? 3
1.1.6 Mobile Application Development Challenges 4
1.17 How to develop Mobile Apps 4
1.2 Introduction to Android Studio 6
1.2.1 What is Android? 6
1.2.2 Different Versions of Android OS 6
1.2.3 Android Development Architecture. 7
1.2.4 Installing Android Studio 8
1.2.5 Android Studio window panes 10
1.2.6 Viewing the Android Manifest 11
1.2.7 Viewing and editing Java code 11
1.2.8 Viewing and editing layouts 12
1.3 Introduction to Project 13
1.3.1 Problem Statement 13
1.3.2 Motivation and Objectives 13
1.3.3 Project Applications 13
2. System Requirements 14
2.1 Hardware Requirements 14
2.2 Software Requirements 14
3. System Design 15
3.1 User Interface Design 15
3.2 ER or Data Flow Diagram 17
v
4. Implementation 18
4.1 Source Code 18
5. Results 35
v
LIST OF FIGURES AND TABLES
Figures
Fig 1.1: Android development architecture. 7
Fig 1.2: Android studio window panes. 10
Fig 1.3 Android Manifest File. 11
Fig 1.4 MainActivity.java. 12
Fig 1.5 Design view of layout. 12
Fig-3.1.1: Main User Interface 15
Fig-3.1.2: Main page of encryption 15
Fig-3.1.2: Main page of hashing technique 16
Fig-5.1: Snapshot of encryption 35
Fig-5.2: Snapshot of decryption 35
Fig-5.3: Snapshot of hashing technique 36
Tables
Table 1.1 Different versions of Android OS 6
v
Android Text Encryption MAD Lab Mini-
Project
CHAPTER 1
INTRODUCTION
1.1Introduction to Mobile Application Development
Mobile application development is the process of making software for smartphones
and digital assistants, most commonly for Android and iOS. The software can be preinstalled
on the device, downloaded from a mobile app store or accessed through a mobile web
browser. The programming and markup languages used for this kind of software
development include Java, Swift, C# and HTML5.
Today, mobile devices—and the mobile applications that unlock their value—are the most
popular way for people and businesses to connect to the internet. To stay relevant, responsive
and successful, organizations need to develop the mobile applications that their customers,
partners and employee’s demand.
Apps are generally downloaded from application distribution platforms which are operated
by the owner of the mobile operating system, such as the App Store (iOS) or Google Play
Store. Some apps are free, and others have a price, with the profit being split between the
application's creator and the distribution platform. Mobile applications often stand in contrast
to desktop applications which are designed to run on desktop computers, and web
applications which run in mobile web browsers rather than directly on the mobile device.
A mobile operating system (OS) is software that allows smartphones, tablet PCs
(personal computers) and other devices to run applications and programs. A mobile OS
typically starts up when a device powers on, presenting a screen with icons or tiles that
present information and provide application access. Mobile operating systems also manage
cellular and wireless network connectivity, as well as phone access.
Native Apps: Such apps are developed for a single mobile operating system exclusively,
therefore they are “native” for a particular platform or device. App built for systems like iOS,
Android, Windows phone, Symbian, Blackberry can’t be used on a platform other than their
own.
Hybrid Apps: They are built using multi-platform web technologies (for example HTML5,
CSS and JavaScript). So-called hybrid apps are mainly website applications disguised in a
native wrapper. Apps possess usual pros and cons of both native and web mobile
applications.
Web Apps: These are software applications that behave in a fashion similar to native
applications. Web apps use a browser to run and are usually written in HTML5, JavaScript or
CSS. These apps redirect a user to URL and offer “install” option by simply creating a
bookmark to their page.
Educational Apps: Educational and informative apps do just that–educate and inform. While
the purpose of this type of app is fairly straightforward, there is a lot of diversity when it
comes to educational apps, like news and language apps. If you’re looking to break into this
crowded space, you’ll need to serve up news or other information in a fun and unique format
for learners of all ages, interests, and levels.
Lifestyle Apps: This app category covers a lot of ground, literally. Where you’re going, how
you’re getting there, what you’re going to order off the menu–it all falls under lifestyle apps.
Think of apps you use for convenience, like fitness, dating, food, and travel. Lifestyle and
leisure apps are increasingly popular, especially for tasks that require an extra step aside from
the search itself (e.g., the scary action of actually picking up the phone to make a call).
Social Media Apps: Social media apps give users the opportunity to connect with people
inside or outside their social circles. For the most part, social media apps are universal and
have a very diverse user base. These apps are used to share live video, post images, facilitate
conversations, and more. Social media apps have quickly become part of our everyday lives.
Productivity Apps: Also known as business apps, productivity apps typically organize and
complete complex tasks for you, anything from sending an email to figuring out the tip on
your dinner bill. Most productivity apps serve a single purpose and are built with a very
intuitive interface and design to increase efficiency and improve user experience.
Entertainment Apps: This category of apps has one sole focus–keeping you busy.
Entertainment apps are often used to fill your time, whether you are jet-setting across the
country, lounging at home, or really anywhere in-between. Along with their websites, a lot of
popular streaming services have mobile applications so users can access their library
wherever they are. Entertainment apps can include video, text, or audio content.
Game Apps: This app category is pretty self-explanatory and represents the biggest portion
of app downloads by far. With such a crowded category, it makes sense that there are so
many types of game apps for different target audiences, such as arcade games, brain training
puzzles, or just plain silly games, like launching tiny birds at pigs. Some mobile app games
are played solo, others online, and occasionally in-person with a group of friends.
Mobile app development is the act or process by which a mobile app is developed for
mobile devices, such as personal digital assistants, enterprise digital assistants or mobile
phones. These applications can be pre-installed on phones during manufacturing platforms, or
delivered as web applications using server-side or client-side processing (e.g., JavaScript) to
provide an "application-like" experience within a Web browser.
To develop apps using the SDK, use the Java programming language for developing the app
and Extensible Markup Language (XML) files for describing data resources. By writing the
code in Java and creating a single app binary, you will have an app that can run on both
phone and tablet. To help you develop your apps efficiently, Google offers a full Java
Integrated Development Environment (IDE) called Android Studio, with advanced features
for developing, debugging, and packaging Android apps. Using Android Studio, you can
develop apps on any available Android device, or create virtual devices that emulate any
hardware configuration.
While the Android platform provide rich functionality for app development, there are
still a number of challenges you need to address, such as:
Step away from any form of technology and get out a pen and paper and define what it is you
want to accomplish. The starting line in the app development word is a pen and paper, not
complex coding and designing.
You need to use the pen and paper that has the answers to the questions about your apps
purpose to develop a sketch of what it will look like. Here you move your clearly worded
ideas into visual representations of your thoughts. Decide if you are going to give your app
away and offer ads to generate money, or are you going to offer it as a paid download. You
can also choose the option to offer in app purchases.
Step 3: Research
You have to dig deep and research the competition of your app idea. I know you think you
have one of a kind idea, but the numbers are not in your favor—odds are someone has
already tried it. You can look at this in two different ways. One you can become deflated
and give up, or two, you can examine the competition and make your app better.
Step 4: Wireframe
In the technology world, a wireframe is a glorified story board. Here is where you take your
sketch and your design idea, and you give your idea a little more clarity and functionality.
This will become the foundation for your app’s development, so it really is a crucial step.
We left off with your wireframe, so at this point in your app development, you have a
storyboard of how you want your app to function. Now it’s time to use that storyboard to
start examine functionality.
Here’s where you need to call in the troops. Show your demo to friends, family, and anyone
else who is willing to give you constructive criticism. Don’t waste your time with people
who will tell you, “Wow, that’s neat.” Seek out those cynics and critics. Brutal honesty is
crucial at this phase.
With the foundation in place, you can start to put the puzzle together to building your app.
First, your developer will set up your servers, databases, and APIs.
Now it’s time to employ the designers to create your UI, user interface. The user interface is a
very important part of your app because people are attracted to how things look and how easy
they are to navigate.
A second round of testing is imperative. In this round, you will have both a functioning app
as well as a user interface to test. All the screens of your app should properly work at this
point, and your app should be visually appealing as well.
You’ve taken your prototype for a spin, and you’ve learned that there are still a few tweaks
you need to make. Now that you’ve seen your app in it’s fully functioning form, you need to
call the troops back and ask they to do the same.
You’ve looked at your app through several different lenses, and you think you’ve managed to
develop a smoothly functioning, aesthetically pleasing, problem solving app. Now, you need
to examine how your app is going to function in a live environment.
You’ve made it to the finish line. You’ve brought your idea to fruition, and the last step is to
share it with the world. Hopefully, you’ve gone on to solve a major problem. If not, with
any luck your app has some features that can simplify or bring enjoyment to someone’s life.
Regardless, you’ve accomplished something big. Now it’s time to distribute it.
Android is one of the most popular mobile device platforms. The Android platform allows
developers to write managed code using Java to manage and control the Android device.
Android Studio is a popular IDE developed by Google for developing applications that are
targeted at the Android platform. Android Studio has replaced Eclipse as the IDE of choice
for developing Android applications.
Android is a software package and Linux based operating system for mobile devices such as
tablet computers and smartphones. It is developed by Google and later the OHA (Open
Handset Alliance). Java language is mainly used to write the android code even though other
languages can be used.
Apps: Your apps live at this level, along with core system apps for email, SMS messaging,
calendars, Internet browsing, or contacts.
Java API Framework: All features of Android are available to developers through
application programming interfaces (APIs) written in the Java language. You don't need to
know the details of all of the APIs to learn how to develop Android apps, but you can learn
more about the following APIs, which are useful for creating apps:
● View System used to build an app's UI, including lists, buttons, and menus.
● Content Providers that enable apps to access data from other apps.
Libraries and Android Runtime: Each app runs in its own process and with its own
instance of the Android Runtime, which enables multiple virtual machines on low-memory
devices. Android also includes a set of core runtime libraries that provide most of the
functionality of the Java programming language, including some Java 8 language features
that the Java API framework uses. Many core Android system components and services are
built from native code that require native libraries written in C and C++. These native
libraries are available to apps through the Java API framework.
Hardware Abstraction Layer (HAL): This layer provides standard interfaces that expose
device hardware capabilities to the higher-level Java API framework.
Linux Kernel: The foundation of the Android platform is the Linux kernel. The above layers
rely on the Linux kernel for underlying functionalities such as threading and low-level
memory management.
System Requirements:
Windows
● Follow the setup wizard in Android Studio and install any SDK packages that it
recommends.
Mac
● Drag and drop Android Studio into the Applications folder, then launch Android
Studio.
● Select whether you want to import previous Android Studio settings, then click OK.
● The Android Studio Setup Wizard guides you through the rest of the setup, which
includes downloading Android SDK components that are required for development.
Linux
● Unpack the .zip file you downloaded to an appropriate location for your applications,
such as within /usr/local/ for your user profile, or /opt/ for shared users.
● If you're using a 64-bit version of Linux, make sure you first install the required
libraries for 64-bit machines.
● Select whether you want to import previous Android Studio settings or not, then click
OK.
● The Android Studio Setup Wizard guides you through the rest of the setup, which
includes downloading Android SDK components that are required for development.
● The Toolbar. The toolbar carries out a wide range of actions, including running the
Android app and launching Android tools.
● The Navigation Bar. The navigation bar allows navigation through the project and
open files for editing. It provides a more compact view of the project structure.
● The Editor Pane. This pane shows the contents of a selected file in the project. For
example, after selecting a layout (as shown in the figure), this pane shows the layout
editor with tools to edit the layout. After selecting a Java code file, this pane shows
the code with tools for editing the code.
● The Status Bar. The status bar displays the status of the project and Android Studio
itself, as well as any warnings or messages. You can watch the build progress in the
status bar.
● The Project Pane. The project pane shows the project files and project hierarchy.
● The Monitor Pane. The monitor pane offers access to the TODO list for managing
tasks, the Android Monitor for monitoring app execution (shown in the figure), the
logcat for viewing log messages, and the Terminal application for performing
Terminal activities.
Before the Android system can start an app component, the system must know that the
component exists by reading the app's AndroidManifest.xml file. The app must declare all its
components in this file, which must be at the root of the app project directory. To view this
file, expand the manifests folder in the Project: Android view, and double-click the file
(AndroidManifest.xml). Its contents appear in the editing pane as shown in the figure below.
Components are written in Java and listed within module folders in the java folder in the
Project: Android view. Each module name begins with the domain name (such as
com.example.android) and includes the app name.
● Click the module folder to expand it and show the MainActivity file for the activity
written in Java (the MainActivity class).
● Double-click MainActivity to see the source file in the editing pane, as shown in the
figure below.
Layout resources are written in XML and listed within the layout folder in the res folder in
the Project: Android view. Click res > layout and then double-click activity_main.xml to see
the layout file in the editing pane. Android Studio shows the Design view of the layout, as
shown in the figure below. This view provides a Palette pane of user interface elements, and a
grid showing the screen layout.
Encryption is changing the way information is displayed so that it is masked and the
only way its true form can be viewed with a clear set of instructions.
Decryption is the reverse process of encryption. It is the process of decoding all encrypted
data using symmetric or asymmetric key in such a way that only authorized parties can
access the data and can read it.
The main purpose of developing a cryptosystem is to protect the user’s data privacy.
Information is transferred from one user to another. In that case, possibilities of data
losing or stealing data still remain there. So it is necessary for us to inspect the overall access
of data from any unauthorized public or interceptor. So, to protect the information from
being lost or stolen, encryption is used/cryptosystem is necessary.
The primary purpose of encryption is to protect the confidentiality of digital data stored on
computer systems or transmitted over the internet or any other computer network.
● This system can be used by everyone who wants to send some confidential text via
social media.
● Fast and easy way of to send secure stuff.
● Easy process to encrypt text.
● Highly secure as type of algorithm and secret key is required while encryption and
decryption.
CHAPTER 2
SYSTEM REQUIREMENTS
2.1 Hardware Requirements
● Tools: Android Studio 4.2.2(Software), Android Phone or Emulator.
● Platform: Windows 8 / Windows 10.
● RAM: 4GB of RAM Minimum, 8GB of RAM is recommended.
● Memory: 256GB of Hard drive.
CHAPTER 3
DESIGN
3.1 User Interface Design
This is the home page of the app where you can see the encryption and hash button.
CHAPTER 4
IMPLEMENTATION
4.1 Source Code
encryption.java
package Encryption;
import android.content.Context;
import android.os.Bundle;
import android.text.InputType;
import android.util.Base64;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.ConstraintSet;
import androidx.fragment.app.Fragment;
import com.example.Algorithms.R;
import java.nio.charset.StandardCharsets;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.PublicKey;
import Encryption.Algorithms.AES;
import Encryption.Algorithms.DES;
import Encryption.Algorithms.PlayFair;
import Encryption.Algorithms.Vigenere;
import Encryption.Algorithms.Caesarcipher;
public class EncryptionMain extends Fragment {
}
message = String.valueOf(Textfield_Text.getText());
key = String.valueOf(Textfield_Key.getText());
String Algorithm = String.valueOf(Switch.getText());
switch (Algorithm) {
case "Advanced Encryption Standard":
AES aes = new AES();
String enc = aes.AESencrypt(key.getBytes("UTF-16LE"),
message.getBytes("UTF-16LE"));
Answer.setText(enc);
break;
case "Triple Data Encryption Standard":
DES des = new DES();
String encData = des.encrypt(key.getBytes("UTF-16LE"),
message.getBytes("UTF-16LE"));
Answer.setText(encData);
break;
case "Caesar Cipher":
if (key.isEmpty()) {
Toast.makeText(view.getContext(), "Enter a key to Encrypt",
Toast.LENGTH_SHORT).show();
return;
}
if (key.length() > 26) {
Toast.makeText(view.getContext(), "The Key must be less than 26 characters",
Toast.LENGTH_SHORT).show();
return;
}
Caesarcipher c = new Caesarcipher();
Answer.setText(c.caesarcipherEnc(message, Integer.parseInt(key)));
break;
case "Vigenere Cipher":
if (Textfield_Key.length() == 0) {
if (Textfield_Text.length() == 0) {
Toast.makeText(view.getContext(), "Enter a message to Decrypt",
Toast.LENGTH_SHORT).show();
return;
}
message = String.valueOf(Textfield_Text.getText());
key = String.valueOf(Textfield_Key.getText());
String SwitchValue = Switch.getText().toString();
switch (SwitchValue) {
case "Advanced Encryption Standard":
AES aes = new AES();
try {
String decData = aes.AESdecrypt(key, Base64.decode(message.getBytes("UTF-
16LE"), Base64.DEFAULT));
Answer.setText(decData);
} catch (Exception e) {
Toast.makeText(view.getContext(), "Your key is wrong",
Toast.LENGTH_SHORT).show();
}
break;
case "Triple Data Encryption Standard":
DES des = new DES();
try {
String decData = des.decrypt(key, Base64.decode(message.getBytes("UTF-
16LE"), Base64.DEFAULT));
Answer.setText(decData);
} catch (Exception e) {
Toast.makeText(view.getContext(), "Your key is wrong",
Toast.LENGTH_SHORT).show();
}
break;
case "Caesar Cipher":
if (Textfield_Key.length() == 0) {
break;
case "Play Fair":
try {
Play_Fair_VALUE.setText(p.Decrypt(message, key));
Matrix_value.setText(p.getT1());
} catch (Exception e) {
Toast.makeText(view.getContext(), "Only Letters are allowed here",
Toast.LENGTH_SHORT).show();
}
break;
}
}
public void switchAlgho(View view) {
reset(null);
String SwitchValue = Switch.getText().toString();
switch (SwitchValue) {
case "Advanced Encryption Standard":
Switch.setText("Triple Data Encryption Standard");
break;
case "Triple Data Encryption Standard":
Textfield_Key.setInputType(InputType.TYPE_CLASS_NUMBER);
Switch.setText("Caesar Cipher");
break;
case "Caesar Cipher":
Textfield_Key.setInputType(InputType.TYPE_CLASS_TEXT);
Switch.setText("Vigenere Cipher");
break;
case "Vigenere Cipher":
Textfield_Key.setVisibility(View.VISIBLE);
Answer.setVisibility(View.GONE);
Matrix_value.setVisibility(View.VISIBLE);
Play_Fair_VALUE.setVisibility(View.VISIBLE);
Switch.setText("Play Fair");
break;
view.getContext().getSystemService(Context.CLIPBOARD_SERVICE);
android.content.ClipData clip = android.content.ClipData
.newPlainText("Your message :", copyText);
clipboard.setPrimaryClip(clip);
}
Toast.makeText(view.getContext(),
"Your message has be copied", Toast.LENGTH_SHORT).show();
} else {
int sdk = android.os.Build.VERSION.SDK_INT;
if (sdk < android.os.Build.VERSION_CODES.HONEYCOMB) {
android.text.ClipboardManager clipboard = (android.text.ClipboardManager)
view.getContext().getSystemService(Context.CLIPBOARD_SERVICE);
clipboard.setText(Play_Fair_VALUE.getText().toString());
} else {
android.content.ClipboardManager clipboard =
(android.content.ClipboardManager)
view.getContext().getSystemService(Context.CLIPBOARD_SERVICE);
android.content.ClipData clip = android.content.ClipData
.newPlainText("Your message :", Play_Fair_VALUE.getText().toString());
clipboard.setPrimaryClip(clip);
}
Toast.makeText(view.getContext(), "Your message has be copied",
Toast.LENGTH_SHORT).show();
}
}
}
hash.java
package Hash;
import android.content.Context;
import android.os.Bundle;
import android.text.InputType;
import android.util.Base64;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import com.example.Algorithms.R;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.SecureRandom;
public class HashMain extends Fragment {
private Button Switch;
private Button Hash_Buuton;
private TextView Answer;
private EditText Textfield_Text;
private EditText Textfield_salt;
private String message;
private String salt;
private View view;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle
savedInstanceState) {
view = inflater.inflate(R.layout.hash_main, container, false);
((AppCompatActivity) getActivity()).getSupportActionBar().hide();
getActivity().getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
Switch = view.findViewById(R.id.Swtich);
Hash_Buuton = view.findViewById(R.id.hash_Buuton);
Answer = view.findViewById(R.id.Answer);
Textfield_Text = view.findViewById(R.id.TextArea);
Textfield_salt = view.findViewById(R.id.salt);
return view;
}
public void hash(View view) throws Exception {
if (Textfield_Text.length() == 0) {
Toast.makeText(view.getContext(), "Enter a message to Hash",
Toast.LENGTH_SHORT).show();
return;
}
message = String.valueOf(Textfield_Text.getText());
salt = String.valueOf(Textfield_salt.getText());
String Algorithm = String.valueOf(Switch.getText());
String answer="";
switch (Algorithm) {
case "MD5":
answer=hashText("MD5",salt,message);
Answer.setText(answer);
break;
case "SHA-256":
answer=hashText("SHA-256",salt,message);
Answer.setText(answer);
break;
case "SHA-512":
answer=hashText("SHA-512",salt,message);
Answer.setText(answer);
break;
}
}
} else {
android.content.ClipboardManager clipboard =
(android.content.ClipboardManager)
view.getContext().getSystemService(Context.CLIPBOARD_SERVICE);
android.content.ClipData clip = android.content.ClipData
.newPlainText("Your message :", copyText);
clipboard.setPrimaryClip(clip);
}
Toast.makeText(view.getContext(),
"Your message has be copied", Toast.LENGTH_SHORT).show();
}
}
main.java
package Main;
import android.os.Bundle;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import com.example.Algorithms.R;
import Encryption.EncryptionMain;
import Hash.HashMain;
public class MainActivity extends AppCompatActivity {
EncryptionMain encryptionMain;
HashMain hashMain;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Fragment fragment = new MainFragment();
case R.id.Decrypt_Buuton:
encryptionMain.decrypt(view);
break;
case R.id.copy_button:
encryptionMain.copyToClipboard(view);
break;
case R.id.reset_button:
encryptionMain.reset(view);
break;
}
}
catch (Exception e){
e.printStackTrace();
}
}
public void HashButtonClick(View view) {
try {
switch (view.getId()) {
case R.id.Swtich:
hashMain.switchAlgho(view);
break;
case R.id.hash_Buuton:
hashMain.hash(view);
break;
case R.id.copy_button:
hashMain.copyToClipboard(view);
break;
case R.id.reset_button:
hashMain.reset(view);
break;
}
}
CHAPTER 5
RESULTS
The following snapshot contains the encryption part of the application where users enter the
text that needs to be encrypted and a key.When the encrypt button is pressed cipher text is
displayed.
The following snapshot contains the hashing part of the application where users enter the text
that needs to be hashed and a salt. When hash button is pressed, hashed text is displayed.
Future Enhancement
● While some messaging apps already offer end-to-end encryption, it could become a
standard feature in the future. This would ensure that only the sender and recipient
can read the encrypted messages, protecting them from unauthorized access or
interception.
● Adding an extra layer of security through multi-factor authentication (MFA) can
significantly enhance the protection of encrypted text messages. This could involve
using biometric authentication (e.g., fingerprint or facial recognition) or hardware
tokens in addition to passwords or PINs.
● Making encryption applications more user-friendly and intuitive can encourage wider
adoption and ensure that individuals can easily encrypt their text messages without
requiring advanced technical knowledge. Streamlined interfaces, guided setup
processes, and automated encryption can all contribute to improving the user
experience.
● Future enhancements could enable seamless encryption and synchronization of text
messages across multiple devices using cloud storage. This would allow users to
access their encrypted messages from different devices while maintaining their
security and privacy.
BIBLIOGRAPHY
Book References
➢ Google Developer Training, "Android Developer Fundamentals Course – Concept
Reference”, Google Developer Training Team, 2017.
➢ Erik Hellman, “Android Programming – Pushing the Limits”, 1st Edition, Wiley India
Pvt Ltd, 2014. ISBN-13: 978-8126547197.
➢ Dawn Griffiths and David Griffiths, “Head First Android Development”, 1st Edition,
O’Reilly
➢ SPD Publishers, 2015. ISBN-13: 978-9352131341.
➢ Bill Phillips, Chris Stewart and Kristin Marsicano, “Android Programming: The Big
Nerd Ranch Guide”, 3rd Edition, Big Nerd Ranch Guides, 2017. ISBN-13: 978-
0134706054.
Web References
➢ Android Developers https://developer.android.com/
➢ Android Tutorial https://www.tutorialspoint.com/android/index.htm
➢ Android Tutorial https://www.w3schools.in/category/android-tutorial/
➢ Java Tutorial https://www.javatpoint.com/java-tutorial
➢ Java Tutorial https://www.w3schools.com/java/