Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 32

FILE ENCODER & DECODER

PROJECT OVERVIEW
It can prevent unauthorized access to confidential file while transferring it from one computer to another by encrypting or encoding data in file. Text encryption. File encryption. Multiple encryption.

Software Requirements
LANGUAGE USED :
CORE JAVA JFC (Swings)

SOFTWARE REQUIREMENTS :
Processor : Intel Pentium or higher Operating System: Windows 95/98/ME/2000/XP/NT JDK Version: 1.4 or higher

Hardware Requirements
RAM: 128 MB or higher PS/2 SCROLL MOUSE PENTIUM IV MONITOR KEYBOARD Hard Disk: 50 MB or free space installation.

Why Java Is Used?


Platform Independent Object Oriented Programming Language Architecture Neutral Interpreted Language Multithreaded Low on System Resources Free Development Tools Portable

INTRODUCTION ABOUT ENCODING & DECODING


The method of encoding includes assigning a context to the data file; and encoding the data file using an encoding method associated with the context. The method of decoding includes reading a context assigned to a data file; and decoding the data file using a decoding method associated with the context. So, by this one can prevent unauthorized access to a confidential file.

ADVANTAGES OF USING THIS SOFTWARE PROGRAM


Encryption method provides protection of confidential data or file against any intentional or accidental disclosure to unauthorized Persons (Hackers). Easy to use. It can encrypt files as large as 200 MB or more. Advanced Password Generator. Password keeper. Invisible mode.

NEED OF ENCRYPTION & DECRYPTION


One of the most common uses of encryption is encrypting emails. Sending sensitive messages, documents and files over the Internet is like sending a postcard as all emails are transmitted in an unsecured form. It doesn't depend on if he send emails via public and private networks. One's message is totally open to interception by anyone along the way - so anybody - his ISP, his boss, etc. can read his/her emails.

Even if he/she connect to his/her server and send his\her his\ emails via SSL, it only means that his/her emails can't be seen while transmitting between him and his server. When his email reaches his server, \it can be seen by his email service provider. Then his server usually sends his email to the recipient in an unsecured way and his email can also be easily seen by anyone. Of course, you may believe that his personal email does not contain any private information, but everyone has got something to keep in secret from his family, neighbors or colleagues. It could be financial, sexual, social, political, or professional secrets. So, there is really only one sure way to protect our email privacy - using encryption.

POINTS CONSIDER FOR DEVELOPING THE PROJECT


Software Program. Password Implementation. Encryption & Decryption.

SOFTWARE PROGRAM
The program is built on enc.java along with help. Java. When the source file is to be encrypted is fed to the program by the user, the program divides the source file into number of chunks of specific size. These chunks are stored in another order. This new file will be in encoded form and can be decoded or decrypted correctly only by the person who has the correct password for the encoded file.

PASSWORD IMPLEMENTATION
A string containing five or more characters can be used as password. Numbers ranging from 0 to 9, alphabets A through Z, & all special characters can be used in the password. One can decode the file only by the correct password. So password is the important security factor for this program.

The password is converted into its ASCII equivalent character by character & then this value is taken as size of each chunk. The maximum value is set as 1280 arbitrarily (so that the password contains at least five characters {5 times 256}). To make the file secure, use of long password is recommended.

ENCRYPTION & DECRYPTION


Encryption is achieved by shifting chunks of the file to a position X bytes away from the current position. Each chunk is password sized. That is, the size of the file chunk is defined by the value of passwords. The program is built around the file handling packages in java. The GUI is built using swing as well as awt components.

The filename inputs are read & opened using File. Then its size is found out. This file is also considered while determining the password. The password is used to determine the chunk size. Byte by byte data is read from the file using a while loop. The data bit is stored in an integer array until the specified file size is reached. When its full, the array is flushed to the output stream file.

EXIT EXIT

FIGURE: - ARCHITECTURE OF PROCESSING A PROGRAM

DESGINING STEPS
Open Notepad or Text Pad. Write the code. Save it as enc.java. Compile it.

The enc class uses GUI classes


Layout : a layout can be thought as a template that is placed over a container define how components will be added. Border Layout: Layout according to compass pints. Grid Layout: Layout on a grid. Gridbag Layout: Layout on a grid where components are of different sizes.

The enc class uses JFC swing classes


The JFC classes have names that begins with the letter j. The JFC classes typically provide more functionality than the corresponding awt classes. The JFC classes reside in the javax.swing package. Everything is drawn & controlled by Java, not by the runtime (platform).

Swing Components used are :


1. JButton: Triggers an action in the user
interface when pressed by the end user.

2. JTextArea: Inputs the text contents in an


area in the user interface window.

3. JLabel: Displays a text string message in


the user interface window.

Constructor It initializes an end users choices and opens the appropriate window for the end users computer. Border Layout manager is used to design the user interface windows layout .

enc Module
enc class consists of Buttons, methods to implement various functionalities of the application : 1.Handles end user actions . 2.Open the appropriate window as per the option selected by the user. user.

Modules in program are :


File encryption. Password generator. Password keeper. File decryption.

DATA FLOW DIAGRAMS

Level 0 Dataflow Diagram/ Context Diagram


User

Data or File

File Encrypted

Encryption Algorithm Or Encoder 0

Level 1 Dataflow Diagram


File
File Encryption 0.2 Get Password

0.3
Read input file

0.1 Data store

Enter Password

File Decryption status

Result

0.4

Dataflow Diagram
3.
Select data from File
Valid Data

File
Password For Encrypting File

Password Store

Display Options

Data Store Data Store Display File name Process result

Check User Password

Display Instructions

Result

ENTITY RELATIONSHIP DIAGRAM


NAME ENCRYPTED ID

USER

HAV E

PASSWORD

ENTER

FILE
STATUS

HAV E BEE N

DECODED

THINGS TO BE NOTED
Decode the encoded file & make sure that its working properly. Maintain a separate copy of the file before encoding. Thereafter, one may or may not delete it. One may also try changing the file format name (using the program) to make it unidentifiable. Forgetting a password is like losing the file. So remember it correctly.

SCREEN SHOT OF PROGRAM OUTPUT

Presented By
DIPESH SHARMA (O88/ECE/06)

You might also like