0% found this document useful (0 votes)
2 views

Mini Project sem IV computer engineering

The document outlines a mini project titled 'Word Generator Using Python' submitted by students for their Bachelor of Engineering in Computer Engineering. It includes sections such as an abstract, literature survey, proposed system, and details of hardware and software requirements, emphasizing the development of a secure chat application utilizing cryptographic techniques for private communication. The project aims to address the need for secure messaging in response to increasing digital threats and privacy concerns.

Uploaded by

mgmevents45
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Mini Project sem IV computer engineering

The document outlines a mini project titled 'Word Generator Using Python' submitted by students for their Bachelor of Engineering in Computer Engineering. It includes sections such as an abstract, literature survey, proposed system, and details of hardware and software requirements, emphasizing the development of a secure chat application utilizing cryptographic techniques for private communication. The project aims to address the need for secure messaging in response to increasing digital threats and privacy concerns.

Uploaded by

mgmevents45
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 33

WORD GENERATOR USING PYTHON

Submitted in partial fulfillment of the requirements of the


degree
BACHELOR OF ENGINEERING IN COMPUTER
ENGINEERING

By
Sanjay A. Sonkawade
(123CP3162A) Shrutik R. Patil
(123CP3185A) Siddhi P. Nalawade
(123CP3120B) Sakshi G. Jadhav
(123CP3104B)

Name of the Guide


Prof. Vidya Bharde

Department of Computer Engineering


MGM’s College of Engineering and Technology,

Kamothe, Navi Mumbai- 410209


University of Mumbai (AY 2022-23)
CERTIFICATE

This is to certify that the Mini Project entitled


“ WORD

GENERATOR USING PYTHON ” is a bonafide work of Sanjay Sonkawade


(123CP3162A), Shrutik Patil (123CP3185A), Siddhi Nalawade
(123CP3120B), Sakshi Jadhav (123CP3104B) submitted to the
University of Mumbai in partial fulfillment of the requirement for the
award of the degree of “Bachelor of Engineering” in “Computer
Engineering”.

(Prof. Vidya Bharde)


Guide Name

(Prof. Rajesh Kadu) (Dr. Geetha S. Lathkar)


Head of Department Director
Mini Project Approval

This Mini Project entitled “ WORD GENERATOR USING PYTHON” by Sanjay


Sonkawade (123CP3162A), Shrutik Patil (123CP3185A), Siddhi Nalawade
(123CP3120B), Sakshi Jadhav (123CP3104B) is approved for the degree of
Bachelor of Engineering in sComputer Engineering.

Examiners

1…………………………………………………..
(Internal Examiner Name & Sign)

2………………………………………
(External Examiner name & Sign)

Date:

Place:
Contents
Table of
Contents

Chapter Topic Page No.

Abstract i

Acknowledgement ii

List of Figures iii

Chapter 1 Introduction 1
1.1 Motivation 1
1.2 Problem Statement 1
1.3 Objectives 1
Chapter 2 Literature Survey 2

2.1 Survey of Existing System 2


2.2 Limitations of Existing Systems or Research Gap 2
2.3 Mini Project Contribution 2
3
Chapter 3 Proposed System
3.1 Architecture/Framework 3

3.2 Details of Hardware & Software


4

3.3 Experiment & Result 4-23

Chapter 4 Conclusion & Future Work 24


Chapter 5
References 25
Abstract
Secure Chat is an innovative Android application designed to enhance the privacy
and security of text-based communication. In an era of increasing digital threats,
this application leverages advanced cryptographic tehniques to protect users'
messages from unauthorized access. Secure Chat ensures that messages remain
confidential and secure during transmission, effectively addressing the need for
private and secure communication.
The primary objective of Secure Chat is to provide users with a user-friendly and
accessible platform for sending and receiving encrypted messages. The application
employs state-of-the-art encryption algorithms to protect the content of messages
and maintain the confidentiality of user data. Key features and functionalities of
Secure Chat include:
1. End-to-End Encryption: Secure Chat utilizes strong end-to-end encryption
protocols to ensure that only the intended recipients can decrypt and read
messages. This encryption methodology prevents any third parties, including
service providers, from accessing the message contents.
2. User-Friendly Interface: The application offers an intuitive and user-friendly
interface, making it easy for both tech-savvy and non-technical users to send
secure messages. Users can send text with ease.
Acknowledgement
We have taken a lot of effort into this project. However, it would not have been
possible without the kind support and help of many individual and our project
guide. We would like to extend our sincere thanks to all of them. We are highly
indebted to Mrs. Vidya Bharde for her guidance and constant supervision and for
providing necessary information regarding the project and the support of the
project. We would like to express our gratitude to Mr. Rajesh Kadu (HOD of the
Computer Engineering Department) for her kind co-operation and encouragement
which helped us in this project. We would like to express our special gratitude and
thanks to all the teaching and non-teaching staff members of our department for
giving us such attention and precious time. Our thanks and appreciations also go to
people who have helped in developing the report and people who have willingly
helped us out their abilities and technical skills.
List of Figures

Figure No. Figure Name Page No.

3 Cryptography Concept 3

3.1 Architecture/Framework 3

4.1 Home Page 21

4.2 Encrypted Page 22

4.3 Decrypted Page 23


Chapter 1: Introduction
Cryptography is associated with the process of converting ordinary plain text into unintelligible text
and vice-versa. It is a method of storing and transmitting data in a particular form so that only those
for whom it is intended can read and process it. Cryptography not only protects data from theft or
alteration but can also be used for user authentication. Cryptography is a technique to achieve
confidentiality of messages. The term has a specific meaning in Greek: “secret writing”. Nowadays,
however, the privacy of individuals and organizations is provided through cryptography at a high
level, making sure that information sent is secure in a way that the authorized receiver can access
this information. With historical roots, cryptography can be considered an old technique that is still
being developed. Examples reach back to 2000 B.C., when the ancient Egyptians used “secret”
hieroglyphics, as well as other evidence in the form of secret writings in ancient Greece or the
famous Caesar cipher of ancient Rome.

1.1 Motivation
The motivation behind our cryptography Android application project, Secure Chat, stems from
the pressing need for secure and private communication in today's digital age. With the ever-
increasing risks to data privacy and the rise of cyber threats, it has become imperative to develop
a user- friendly and accessible solution that empowers individuals and organizations to protect
their sensitive information.

1.2 Problem Statements


The need for a secure Cryptography Android Application arises due to the
vulnerability of data in current messaging apps, highlighting the importance of
safeguarding user privacy.

1.3 Objectives
1. User-Friendly App: Develop an intuitive Android app appealing to various users.
2. End-to-End Encryption: Implement advanced encryption for secure messaging.
Chapter 2: Literature Survey
In a review on network security and cryptography, Sandeep Tayal et al. mentioned that
with the emergence of social networks and commerce applications, huge amounts of data
are produced daily by organizations across the world. This makes information security a
huge issue in terms of ensuring that the transfer of data through the web is guaranteed.
With more users connecting to the internet, this issue further demonstrates the necessity of
cryptography techniques. This paper provides an overview of the various techniques used
by networks to enhance security, such as cryptography.

2.1 Survey of Existing System


Existing Cryptography Android Applications commonly provide basic messaging
functionality, partial encryption, and user authentication. However, these apps often lack
strong encryption, have privacy concerns due to ownership, complex key management,
and varied security practices.

2.2 Limitations of Existing Systems or Research Gap


The limitations of existing Cryptography Android Applications include weak encryption,
privacy concerns, complex key management, lack of open-source transparency,
inadequate data storage security, variable self-destructing messages, and inconsistent
security practices. These limitations underscore the research gaps in developing a more
secure, privacy-focused, and user-friendly application.

2.3 Mini Project Contribution


The mini project's contribution to the Cryptography Android Application project
involved the development of a user-friendly and intuitive user interface for the
application.
Chapter 3: Proposed System
Cryptography is associated with the process of converting ordinary plain text into unintelligible
text and vice-versa. It is a method of storing and transmitting data in a particular form so that
only those for whom it is intended can read and process it. Cryptography not only protects data
from theft or alteration but can also be used for user authentication.

Fig 3: Cryptography Concept

3.1 Architecture/Framework

Fig.3.1 Architecture/Framework
3.2 Details of Hardware & Software
 Software Requirements:
 Android Studio
 Browser

 Hardware Requirements:
 Computer System (8GB Ram & Min.128 Storage)
 Android Phone(2GB Ram or Above)

3.3 Experiment and Results


Manifest.xml

<?xml version="1.0" encoding="utf-8"?>


<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" >

<uses-permission-sdk-23 android:name="android.permission.INTERNET" />


<uses-permission-sdk-23
android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.CryptoKing"
tools:targetApi="31" >
<activity
android:name=".Decoder"
android:exported="false" />
<activity
android:name=".Encoder"
android:exported="false" />
<activity
android:name=".MainActivity"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>

Activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/pic"
tools:context=".MainActivity">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_margin="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_marginBottom="5dp">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Cryptoking"
android:textColor="#EDC9AE"
android:textSize="40sp"
android:textStyle="bold"/>
</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="center"
android:layout_marginTop="50dp">
<View
android:id="@+id/divider1"
android:layout_width="wrap_content"
android:layout_height="5dp"
android:background="#66FAFAFA"/>

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="5dp">

<ViewFlipper
android:id="@+id/vf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"/>

</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="center"
android:layout_marginTop="5dp">

<View

android:layout_width="wrap_content"
android:layout_height="5dp"
android:background="#66FAFAFA"/>

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="center"
android:layout_marginTop="30dp">

<Button
android:layout_width="280dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="5dp"
android:text="Encryption"
android:id="@+id/encd"
android:textSize="25dp"
android:textStyle="bold"
/>

<Button
android:layout_width="280dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="5dp"
android:text="Decryption"
android:id="@+id/decd"
android:textSize="25dp"
android:textStyle="bold"
/>
</LinearLayout>
</LinearLayout>
</ScrollView>

Activity_encoder.xml
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools=http://schemas.android.com/tools

android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/background5"
tools:context=".Encoder">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_margin="5dp">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="5dp">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Encrypter"
android:textColor="#EDC9AE"
android:textSize="30sp"
android:textStyle="bold"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="5dp"
android:layout_gravity="center">

<View
android:id="@+id/divider1"
android:layout_width="wrap_content"
android:layout_height="5dp"
android:background="#66FAFA"/>

</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginRight="5dp"
android:layout_marginBottom="15dp"
android:layout_marginLeft="15dp">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="Enter your text here"
android:textColor="#EDC9AE"
android:textSize="20sp"
android:layout_marginTop="5dp"
android:layout_gravity="left"/>
<EditText
android:id="@+id/etenc"
android:layout_width="360dp"
android:layout_height="60dp"
android:layout_gravity="center"
android:textSize="20sp"
android:textColor="#FAFAFA"
android:layout_marginTop="5dp"/>

<Button
android:id="@+id/btnenc"
android:layout_width="230dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Encrypt"
android:background="@drawable/buttonoutline"
android:textSize="20sp"
android:textStyle="bold"
android:onClick="enc"
android:textColor="#EDC9AE"/>

</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="center"
android:layout_marginTop="15dp">
<View
android:id="@+id/divider2"
android:layout_width="match_parent"
android:layout_height="5dp"
android:background="#66FAFA"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="5dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" your Encrypted text here"
android:textColor="#EDC9AE"
android:textStyle="bold"
android:textSize="20sp"
android:layout_marginTop="5dp"
android:layout_gravity="left"/>
<TextView
android:id="@+id/enctv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:layout_gravity="left"
android:textColor="#FAFAFA"
android:layout_marginTop="5dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_margin="5dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp">

<Button
android:layout_width="230dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Copy"
android:background="@drawable/buttonoutline"
android:textStyle="bold"
android:textSize="20sp"
android:textColor="#EDC9AE"
android:onClick="cp2"/>
</LinearLayout>
</LinearLayout>
</ScrollView>

Activity_decoder.xml
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"

android:background="@drawable/background5"
tools:context=".Decoder">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_margin="5dp">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="5dp">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Decrypter"
android:textSize="30sp"
android:textStyle="bold"
android:textColor="#EDC9AE"/>
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="5dp"
android:layout_gravity="center">

<View
android:id="@+id/divider1"
android:layout_width="wrap_content"
android:layout_height="5dp"
android:background="#66FAFA"/>

</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="5dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Enter Your Text Here"
android:textSize="20sp"
android:textStyle="bold"
android:textColor="#EDC9AE"
android:layout_marginTop="5dp"
android:layout_gravity="left"/>

<EditText
android:id="@+id/etdec"
android:layout_width="360dp"
android:layout_height="80dp"
android:layout_gravity="center"
android:textSize="20sp"
android:textColor="#FAFAFA"
android:layout_marginTop="5dp"/>

<Button
android:layout_width="230dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Decrypt"
android:textStyle="bold"
android:background="@drawable/buttonoutline"
android:textSize="20sp"
android:textColor="#EDC9AE"
android:onClick="dec"/>

</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="15dp">
<View
android:id="@+id/divider2"
android:layout_width="wrap_content"
android:layout_height="5dp"
android:background="#66FAFA"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="15dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Your decrypted text here"
android:textSize="20sp"
android:textColor="#EDC9AE"
android:layout_marginTop="5dp"
android:layout_gravity="left"/>
<TextView
android:id="@+id/dectv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:textColor="#FAFAFA"
android:layout_marginTop="5dp"
android:layout_gravity="left"/>
</LinearLayout>

<Button
android:id="@+id/btncp1"
android:layout_width="230dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Copy"
android:background="@drawable/buttonoutline"
android:textStyle="bold"
android:textSize="20sp"
android:textColor="#EDC9AE"
android:onClick="cp1"/>
</LinearLayout>

</ScrollView>

Buttonoutline.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

<stroke
android:width="3dp"
android:color="#EDC9AE"/>
<corners
android:radius="3dp"/>
</shape>

MainActivity.java

package com.example.cryptoking;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ViewFlipper;

import java.util.Stack;

public class MainActivity extends AppCompatActivity {


Button enc,dec,abt;
ViewFlipper vf;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager
.LayoutParams.FLAG _FULLSCREEN);

setContentView(R.layout.activity_main);
enc=findViewById(R.id.encd);
dec=findViewById(R.id.decd);

enc.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent temp=new Intent(MainActivity.this,Encoder.class);
startActivity(temp);
}
});

dec.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent temp=new Intent(MainActivity.this,Decoder.class);
startActivity(temp);
}
});
vf=findViewById(R.id.vf);
int
images[]={R.drawable.bellaso_cipher,R.drawable.caesar_cipher_encryption,R.drawable.dorabe
lla_cipher};
for (int i=0;i<images.length;i++){
flipper(images[i]);
}
}

private void flipper(int images) {


ImageView test=new ImageView(this);
test.setBackgroundResource(images);
vf.addView(test);
vf.setFlipInterval(3000);
vf.setAutoStart(true);
vf.setInAnimation(this,android.R.anim.slide_in_left);
vf.setInAnimation(this,android.R.anim.slide_out_right);
}
}

Encode.java

package com.example.cryptoking;

public class encode {


public static String enc(String s) {
String initializer = "11111111";
int ct = 0;
int a[] = new int[11111111];
for (int i = 0; i < s.length(); i++) {
a[i] = (int) s.charAt(i);
ct++;
}
String res = "";
int bin[] = new int[111];
int idx = 0;
for (int ii = 0; ii < ct; ii++) {
int temp = a[ii];
for (int j = 0; j < ct; j++) bin[j] = 0;
idx = 0;
while (temp > 0) {
bin[idx++] = temp % 2;
temp = temp / 2;

}
String dig = "";
String temps;
for (int j = 0; j < 7; j++) {
temps = Integer.toString(bin[j]);
dig = dig.concat(temps);

}
String rev="";
for (int j=dig.length()-1;j>=0;j--){
char ca= dig.charAt(j);
rev=rev.concat(String.valueOf(ca));
}
res=res.concat(rev);
}
res=initializer.concat(res);
return res;
}
}

Decode.java
package com.example.cryptoking;

import static java.lang.Math.pow;

public class decode {


public static String dec(String s){
String inv="This code was not Encryted by Cryptoking";
String initializer="11111111";
Boolean flag =true;
for (int i=0;i<8;i++){

if(initializer.charAt(i)!=s.charAt(i)){
flag=false;
break;
}
}
String data="";
for ( int i=8;i<s.length();i++){

char temp=s.charAt(i);
data=data.concat(String.valueOf(temp));
}
int asc[][] =new int [11101][8];
int idx=1;
int idx2=0;
for(int i=0;i<data.length();i++){
if(i%7==0){
idx++;
idx2=0;
char temp=data.charAt(i);
asc[idx][idx2]=temp-'0';
idx2++;
}
else {
char temp=data.charAt(i);
asc[idx][idx2]=temp-'0';
idx2++;
}
}
int num[]=new int[11111];
int nidx=0;
int temp=0;
int ct=0;
for (int i=0;i<=idx;i++){

ct=0;
temp=0;
for (int j=6;j>=0;j--){
int temp1=(int)pow(2,ct);
temp+=(asc[i][j]*temp1);
ct++;

}
num[nidx++]=temp;
}

String rv="";
char ch;
for (int i=0;i<nidx;i++)
{
ch=(char)num[i];
rv=rv.concat(String.valueOf(ch));

}
if (data.length()%7==0 && flag==true){
return rv;
}
else{

return inv;
}}}

Encoder.java

package com.example.cryptoking;

import androidx.appcompat.app.AppCompatActivity;

import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
public class Encoder extends AppCompatActivity {
EditText etenc;
TextView enctv;
ClipboardManager cpb;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_encoder);

etenc=findViewById(R.id.etenc);
enctv=findViewById(R.id.enctv);
cpb=(ClipboardManager)getSystemService(Context.CLIPBOARD_SERVICE);

}
public void enc(View view){
String temp=etenc.getText().toString();
String rv=encode.enc(temp);
enctv.setText(rv);

}
public void cp2(View view){
String data=enctv.getText().toString().trim();
if (!data.isEmpty()){
ClipData temp=ClipData.newPlainText("text",data);
cpb.setPrimaryClip(temp);
Toast.makeText(this, "Copied", Toast.LENGTH_LONG).show();
}
}
}
Decoder.java

package com.example.cryptoking;

import androidx.appcompat.app.AppCompatActivity;

import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import java.util.Base64;

public class Decoder extends AppCompatActivity {


EditText etdec;
TextView dectv;
ClipboardManager cp1board;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_decoder);

etdec=findViewById(R.id.etdec);
dectv=findViewById(R.id.dectv);
cp1board=(ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
}
public void dec(View view){
String temp=etdec.getText().toString();
String rv = decode.dec(temp);
dectv.setText(rv);

}
public void cpl(View view){
String data=dectv.getText().toString().trim();
if (!data.isEmpty()){
ClipData temp=ClipData.newPlainText("text",data);
cp1board.setPrimaryClip(temp);
Toast.makeText(this, "copied", Toast.LENGTH_SHORT).show();
}

}
}
Fig 4.1 Home Page
Fig 4.2 Encrypted Page
Fig 4.3 Decrypted Page
Chapter 4: Conclusion and Future Work
The Cryptography Android Application project concludes with the successful development of
"Secure Chat," ensuring user privacy and data security through robust encryption and user-
friendly features.
In the future, the project could focus on expanding features, optimizing performance, and
addressing emerging security challenges. Additionally, user feedback will be invaluable for
continuous improvement.
Chapter 5: REFERENCES
1. S. Tayal, N. Gupta, P. Gupta, D. Goyal and M. Goyal, "A Review paper on Network
Security and Cryptography," Advances in Computational Sciences and Technology, vol.
10, no. 5, pp. 763-770, 2017
2. (PDF) A Review Paper on Cryptography (researchgate.net)
3. http://www.android.com
4. www.youtube.com

You might also like