Main Project Final Mad
Main Project Final Mad
Submitted by
Akshay Bhandwalkar
JSPM‟s
JAYAWANTRAO SAWANT POLYTECHNIC, Handewadi Road,
Hadapsar, Pune-28
Department of Information Technology
Affiliated to
Maharashtra State
Board of Technical Education
Certificate
This is to certify that Akshay Prakash Bhandwalkar with Roll No- 53 has successfully completed
Micro-project in course Mobile Application Development(22617) for the academic year 2022-2023 as
prescribed in the 'Assessment Manual' during his/her tenure of completing Sixth Semester of Diploma
Programme in Information Technology from Institute, JSPM‟S Jayawantrao Sawant Polytechnic with
Institute code 0711.
I. INTRODUCTION:-
Data hiding is a popularly used technique for secure communication. Data
hiding is the technique of embedding information into digital content without causing
perceptual degradation. Watermarking, cryptography and steganography are three
famous techniques used in data hiding. Steganography is an ancient science for hiding
the information in the communication. Steganography is defined as a technique for
concealing information and it is applied in the area of the computers and networks
widely. There are different types of steganography processes like steganography for
hiding data in a text, steganography for hiding data in an image, steganography for
hiding images in an audio, steganography for hiding images in a video, steganography
for hiding images in a protocol etc. Among them, image steganography is the mostly
used technique now-a-days. Image Steganography is defined as a hiding process of a
secret message within an image in such a way that others cannot understand the
presence of contents of the hidden message.
A. Hardware Requirements
1. Java
2. XML
3. Android Studio
IV. ARCHITECTURE DIAGRAM:-
V. EXISTING SYSTEM:-
There have been many techniques for hiding messages in images in such a
manner that the alterations made to the image are perceptually indiscernible. However,
the question whether they result in images that are statistically indistinguishable from
unhampered images has not been adequately explored. There are various algorithms
used to hide a message in an image. But, mostly in all the places the old algorithms are
used. Which is not a huge problem, but as the technology develops, the latest algorithm
must be used to not question the privacy of users.
VI. PROPOSED SYSTEM:-
activity_main.xml
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_margin="16dp" android:layout_width="match_parent"
android:layout_height="match_parent"><Button android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="Encode"
android:layout_marginTop="125dp" android:layout_centerHorizontal="true"
android:layout_alignParentTop="true" android:id="@+id/encode_button"/><Button
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="Decode" android:layout_marginTop="65dp" android:id="@+id/decode_button"
android:layout_below="@+id/encode_button"
android:layout_alignEnd="@+id/encode_button"/></RelativeLayout>
activity_encode.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_margin="16dp"
xmlns:android="http://schemas.android.com/apk/res/android" >
<ImageView
android:id="@+id/imageview"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
<Button
android:id="@+id/choose_image_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="Choose Image" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/choose_image_button"
android:layout_marginTop="45dp"
android:layout_toStartOf="@+id/choose_image_button"
android:text="Message - "
android:textAlignment="center"
android:textAllCaps="false"
android:textAppearance="@style/TextAppearance.AppCompat.Button"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="@+id/textView"
android:layout_below="@+id/message"
android:layout_marginTop="35dp"
android:text="Secret Key - "
android:textAlignment="center"
android:textAllCaps="false"
android:textAppearance="@style/TextAppearance.AppCompat.Button"
android:textSize="16sp"
android:textStyle="bold" />
<EditText
android:id="@+id/secret_key"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/textView2"
android:layout_alignBottom="@+id/textView2"
android:layout_alignParentEnd="true"
android:layout_marginEnd="19dp"
android:ems="10"
android:hint="Enter secret key"
android:inputType="textPassword"
android:textSize="14sp" />
<EditText
android:id="@+id/message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="@+id/secret_key"
android:layout_alignTop="@+id/textView"
android:ems="10"
android:hint="Enter message"
android:inputType="textPersonName"
android:textSize="14sp" />
<Button
android:id="@+id/encode_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginEnd="17dp"
android:layout_toStartOf="@+id/secret_key"
android:text="Encode"
android:textAlignment="center"
android:textSize="14dp" />
<Button
android:id="@+id/save_image_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignEnd="@+id/secret_key"
android:layout_alignTop="@+id/encode_button"
android:layout_marginEnd="36dp"
android:text="Save Image" />
<TextView
android:id="@+id/whether_encoded"
android:layout_width="70dp"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:textStyle="bold" />
</RelativeLayout>
activity_decode.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_margin="16dp"
xmlns:android="http://schemas.android.com/apk/res/android" >
<ImageView
android:id="@+id/imageview"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
<Button
android:id="@+id/choose_image_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="Choose Image" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/choose_image_button"
android:layout_marginTop="45dp"
android:layout_toStartOf="@+id/choose_image_button"
android:text="Secret Key -"
android:textAlignment="center"
android:textAllCaps="false"
android:textAppearance="@style/TextAppearance.AppCompat.Button"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/message"
android:layout_alignBottom="@+id/message"
android:layout_alignStart="@+id/textView"
android:text="Message"
android:textAlignment="center"
android:textAllCaps="false"
android:textAppearance="@style/TextAppearance.AppCompat.Button"
android:textSize="16sp"
android:textStyle="bold" />
<EditText
android:id="@+id/secret_key"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/textView"
android:layout_alignBottom="@+id/textView"
android:layout_alignParentEnd="true"
android:layout_marginEnd="18dp"
android:ems="10"
android:hint="Enter secret key"
android:inputType="textPassword"
android:textSize="14sp" />
<EditText
android:id="@+id/message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/decode_button"
android:layout_alignStart="@+id/secret_key"
android:layout_marginBottom="20dp"
android:ems="10"
android:hint="Your message"
android:inputType="textPersonName"
android:textSize="14sp" />
<Button
android:id="@+id/decode_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:text="Decode"
android:textAlignment="center"
android:textSize="14dp" />
<TextView
android:id="@+id/whether_decoded"
android:layout_width="70dp"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:textStyle="bold" />
</RelativeLayout>
MainActivity.java
package com.ayush.steganography;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button encode = findViewById(R.id.encode_button);
Button decode = findViewById(R.id.decode_button);
encode.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(getApplicationContext(), Encode.class));
}
});
decode.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(getApplicationContext(), Decode.class));
}
});
}
}
Encode.java
package com.ayush.steganography;
import android.Manifest;
import android.app.ProgressDialog;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.provider.MediaStore;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import com.ayush.imagesteganographylibrary.Text.AsyncTaskCallback.TextEncodingCallback;
import com.ayush.imagesteganographylibrary.Text.ImageSteganography;
import com.ayush.imagesteganographylibrary.Text.TextEncoding;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;
public class Encode extends AppCompatActivity implements TextEncodingCallback {
private static final int SELECT_PICTURE = 100;
private static final String TAG = "Encode Class";
//Created variables for UI
private TextView whether_encoded;
private ImageView imageView;
private EditText message;
private EditText secret_key;
//Objects needed for encoding
private TextEncoding textEncoding;
private ImageSteganography imageSteganography;
Outputs
Advantages Of Image Stegnography:
It is used in the way of hiding not the information but the password to reach that information.
Difficult to detect. Only receiver can detect.
Can be applied differentely in digital image, audio and video file.
It can be done faster with the large number of softwares
➢ Conclusion:-
As steganography becomes more widely used in computing, there are issues that
need to be resolved. There are a wide variety of different techniques with their own
advantages and disadvantages. Many currently used techniques are not robust enough
to prevent detection and removal of embedded data. The use of benchmarking to
evaluate techniques should become more common and a more standard definition of
robustness is required to help overcome this. For a system to be considered robust it
should have the following properties: 1) The quality of the media should not noticeably
degrade upon addition of a secret data. 2) Secret data should be undetectable without
secret knowledge, typically the key. 3) If multiple data are present, they should not
interfere with each other. 4) The secret data should survive attacks that don’t degrade
the perceived quality of the work. This work presents a scheme that can transmit large
quantities of secret information and provide secure communication between two
communication parties. Both steganography and cryptography can be woven into this
scheme to make the detection more complicated. Any kind of text data can be employed
as secret msg. The secret message employing the concept of steganography is sent over
the network. In addition, the proposed procedure is simple and easy to implement. Also,
the developed system has many practical, personal and militaristic applications for both
point-to-point and point-to multi- point communications.
➢ References:-
[1] Feng, J.B., Lin, I.C., Tsai, C.S., Chu, Y.P., 2006. Reversible watermarking: current
status and key issues. International Journal of Network Security 2 (May), 161–170. [2]
C. K. Chan, L. M. Cheng, “Hiding data in image by simple LSB substitution”, pattern
recognition, Vol. 37, No. 3, 2004, pp. 469-474.
(A) (B)
Total Marks
Process and Product Assessment Individual Presentation/Viva
(10 Marks)
(6 Marks) (4 Marks)