Download - Christ the King Polytechnic College
-
7/30/2019 Christ the King Polytechnic College
1/39
CHRIST THE KING POLYTECHNIC
COLLEGE
OTTHAKALMANDAPAM, COIMBATORE
By
FEENA.T.S
III rd Year
INFORMATION TECHNOLOGY
-
7/30/2019 Christ the King Polytechnic College
2/39
SECURITY PROCESS BY USING WPC
CRYPTOGRAPHY IN AD-HOC
NETWORKS
MINI PROJECT
NOVEMBER 2011
-
7/30/2019 Christ the King Polytechnic College
3/39
ABSTRACT
Cryptography and steganography have been known for many years in the
computer world for secured data transfer. The project aims at sending confidential information in
a secure manner. This project based on encryption the message into picture instead of using
character to character replacement. The best way for secured data transfer is to combine two
security techniques Cryptography (For Encryption & Decryption) and Steganography (For Data
hiding in a multimedia object). In this process the file which is given in text format is morphed
inside a picture and protected using a key.
Cryptography enables you to send sensitive information across in secure networks.
Steganography is hiding a secret message within a larger object in such a way that others cannot
discern the presence of the hidden message. Steganography is used to communicate messages
under the cover of innocence signals such as digital images. For the security of steganography,
messages are embedded into the cover by altering the least significant components of the cover.
Therefore, the sender needs to select a channel that includes only insignificant parts of the cover
before embedding messages. However, if the rules for determining the selection channel are
public, the attacker can use this information to detect the existence of the covert communication.
To solve this problem, we use wet paper codes (WPCs), which enable the sender to determine
the selection channel freely, and the recipient to extract the embedded messages without any
knowledge about the selection channel.WPCs have been used in various branches of information
hiding. WPC is a model of embedding messages into a cover with defective cells. Taking the
image as an example, we denote changeable pixels by dry positions and defective pixels by wet
positions. The wet paper model is a generalization of the dry paper model that is for embedding
messages into covers without defective pixels.
-
7/30/2019 Christ the King Polytechnic College
4/39
CHAPTER 1
1.INTRODUCTION
1.1 OBJECTIVE
Data hiding technique can facilitate security and the safe transmission of important
information in the digital domain, which generally requires a high embedding payload and good
stegno image quality. Recently, a steganographic framework known as wet paper coding has
been utilized as an effective strategy in image hiding to achieve the requirements of high
embedding payload, good quality and robust security. The project titled SECURITY
PROCESS BY USING WPC CRYPTOGRAPHY IN AD-HOC NETWORKS aims at
sending confidential information in a secure manner. This project is based on encrypting themessage into picture instead of using character to character replacement.
In this process the file which is given in text format is morphed inside a picture and
protected using a key. The sender will encrypt the text by embedding the text into a picture using
a secret key. The receiver uses the same secret key to decrypt the picture and he gets the plain
text. During the traversal if the intruders view the file they can able to view only the picture,
because the text is replaced inside the pictures data. This process is also otherwise called as
morphing.
1.2 BENEFITS
The advantage of Ciphering media files over cryptography alone, is that messages do
not attract attention to themselves, messengers or to recipients.
An unhidden coded message, no matter how unbreakable it is, will arouse suspicion and
may in itself be incriminating. In some countries encryption is illegal. Although encrypted data is
difficult to decipher, it is relatively easy to detect. Encryption only obscures a message's
meaning, not its existence. Therefore, steganography, a technique that hides the existence of a
message, is often used to supplement encryption. It's easy to use and works by replacing bits of
unused data in computer files or communication channels, such as telephone lines or radio
broadcasts.
-
7/30/2019 Christ the King Polytechnic College
5/39
CHAPTER 2
2. SYSTEM ANALYSIS
STEGANOGRAPHY is used to communicate messages under the cover ofinnocence signals such as digital images. For the security of steganography, messages are
embedded into the cover by altering the least significant components of the cover. Therefore, the
sender needs to select a channel that includes only insignificant parts of the cover before
embedding messages. However, if the rules for determining the selection channel are public, the
attacker can use this information to detect the existence of the covert communication. To solve
this problem,we propose wet paper codes (WPCs), which enable the sender to determine the
selection channel freely, and the recipient to extract the embedded messages without any
knowledge about the selection channel.
WPCs have been used in various branches of information hiding .
2.1 EXISTING SYSTEM
In the traditional system the ciphering media files is achieved in painting where
certain hints are hidden along with the symbols, Likewise now the existing system is framed in
such a way that the message need to be hidden and reproduce using its hint specified to the user.
Considering existing System, to give more security to stegnography, messages
are embedded into the cover by altering the least significant components of the cover. Therefore,
the sender needs to select a channel that includes only insignificant parts of the cover before
embedding messages. However, if the rules for determining the selection are public, the attacker
can use this information to detect the existence of the covert communication.
2.1.1 DISADVANTAGES
The system cannot be done in more than one format.
Lack of database security.
Many datas are not stored dynamically in many location.
Access speed is less for searching and modifying data.
Integral security cannot be maintained throughout the process.
-
7/30/2019 Christ the King Polytechnic College
6/39
The user cannot hide transformation of message.
The files that are transferred cannot be hided which leads to insecurity.
Messages cannot be sent from the PC to mobile.
2.2 PROPOSED SYSTEM
The need for the proposed system arises from the limitations of the existing
system, which is a static one. To Solve the existing problem, the new system proposing a wet
paper codes(WPCs), which enable the sender to determine the selection channel freely, and the
recipient to extract the embedded messages without any knowledge about the selection
channel.The Primary Objective of the proposed system is to achieve synchronization & security
The proposed system maintains a secured database, which can store the relevant information
about the messages that takes place while processing.
To develop an user friendly software that meets the user needs any time.
Information can be created and altered by administrator. In the system the customer can access
the product catalogs of the organization.
2.2.1 ADVANTAGES
Increases the customer satisfaction.
Data tampering is reduced
Provides security that protect against outsider crime.
Includes hidden transformation of messages.
Brings down number of storage processing mistakes.
Many messages are stored in more than one location dynamically.
-
7/30/2019 Christ the King Polytechnic College
7/39
2.3 FEASIBILITY STUDY
The feasibility study is the important step in any software development process.The
development and implementation of a Security Process by using WPC in Cryptography in AD-
HOC Networks system is definitely possible. It requires detailed description of the intended
users and the people who will be benefited in implementing the process. By finding the target
users the economical feasibility should be adjusted. Since many data transferring systems of the
project is completely feasible. The comparison phase is the application part of the extraction
phase that gives the reliability of the proposed system and the algorithm under use. While
comparing the existing systems and the proposed system, the system is highly feasible and is
useful to a large community of people. During system analysis, the feasibility study of the
proposed system is to be carried out. The main objective of this study is to determine whether the
proposed system is feasible or not i.e. to ensure that proposed system is not a burden to the
organization. The study can be categorized into three types. They are:
Technical Feasibility
Operational Feasibility
Economic Feasibility
2.4.1 TECHNICAL FEASIBILITY
This study is carried out to check the technical requirements of the system. This
ensures that the system is logically sequential. The following are checked to ensure technical
feasibility. This study is carried out to check the technical facility, i.e. the technical
requirements of the system. Many languages are used in the field of data hiding such as
MATLAB, C#, .NET, Java. Considering unique features of VB.NET like robustness, secure,
portability and high performance we chose VB.NET as our front end. The developed system
(WPC method) has a modest technical requirement, as only minimal or null changes are
required in implementing the system.
-
7/30/2019 Christ the King Polytechnic College
8/39
The resources required for this project are easily available.
The softwares like VB.NET and SQL server are easy to work with and they
are easily available too.
The softwares works in almost all the operating systems and thus it is very
efficient.
Thus we can say that the system Security Process by using WPC in
Cryptography in AD-HOC Networks is technically feasible.
2.3.2 OPERATIONAL FEASIBILITY
Operational feasibility is dependent on human resources available for the project and
involves projecting whether the system will operate and be used once it is installed. Our project
is operationally feasible since it is has wide range of uses once it is implemented. The features in
our project are
(1)The system is purely user friendly and very graphical. And so the user environment
is also big where the necessity in implementing the system should be preached.
(2)The system is capable enough to guide all kind of users in effectively and efficiently
using the data transferring system.
(3)The usage by large community of people depends on the user friendliness of the system.
So the system should be very simple in terms of appearance and should lead to next step.
(4)The Security Process by using WPC in Cryptography in AD-HOC Networks system is
highly secure and effective that everyone can use it.
(5)Simple user interface.
-
7/30/2019 Christ the King Polytechnic College
9/39
2.4.3 ECONOMIC FEASIBILITY
The system Security Process by using WPC in Cryptography in ADHOC
Networks can be developed at a reasonable cost with the available hardware, software and
manpower. So its benefits overweigh the cost. And also this system ensures the amount
invested in creating the software is not wasted by providing an excellent comparison
module. So we can say that this project is highly economical.
The data transferring system is applied to a wide range of applications andcan also be used to send data effectively and safely from one place to another. The data can
be sent through AD-HOC networks by using the techniques called steganography and
cryptography. Security Process by using WPC in Cryptography in AD-HOC Networks
system is more feasible in terms of economy.
-
7/30/2019 Christ the King Polytechnic College
10/39
CHAPTER 3
3. SYSTEM SPECIFICATION
3.1 HARDWARE SPECIFICATION
Processor : Pentium IV
Processor Speed : 1.7 GHz
Memory (RAM) : 256 MB
Hard Disk : 10 GB
Monitor : 14 Monitor
Keyboard : 104 keys Keyboard
Mouse : Optical Mouse
Modem : GSM Modem(RS232 protocol)
3.2 SOFTWARE CONFIGURATION
Operating System :Windows XP
Front End :VB.Net 2008
Back End :MS Access
-
7/30/2019 Christ the King Polytechnic College
11/39
CHAPTER 4
4. SOFTWARE DESCRIPTION
4.1 FRONT-END DESCRIPTION
The Software description of the SECURITY PROCESS BY
USING WPC CRYPTOGRAPHY IN AD HOC NETWORKS system is the entire
specification of the system that includes the modules and the algorithms that are
needed to implement the system. It is carried out by sequentially floating through the
modules like
WPC area
SMART CODE GENERATOR
SMART CODE VALIDATION
Encrypting
Decrypting
The modules are being executed with the help of methodology and algorithms
.The algorithms based on which the modules are implemented are
Kernel registry algorithm
Smart code generator algorithm
-
7/30/2019 Christ the King Polytechnic College
12/39
LOGIN
PrivateSub cmd_clear_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmd_clear.Click
If global_check = 2 Then
MsgBox("Sorry! you are not an authorized user",
MsgBoxStyle.Critical, "Security Area")
End
Else
MsgBox("Invalid Pin Code", MsgBoxStyle.Critical, "Security Area")
global_check = global_check + 1
EndIf
EndSub
CONNECTION SETTING
PublicClass commsetting
PublicShared Comm_Port AsInteger = 11
PublicShared Comm_BaudRate As Int64 = 115200
PublicShared Comm_TimeOut As Int64 = 0
PublicShared comm AsNew GsmCommMain
EndClass
ENCRYPTION
PublicClass Frm_menu
PrivateSub OK_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles OK.Click
msg_steg.Show()
EndSub
-
7/30/2019 Christ the King Polytechnic College
13/39
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dec_msg.Show()
EndSub
PrivateSub Frm_menu_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) HandlesMyBase.Load
EndSub
PrivateSub Label1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Label1.Click
EndSub
EndClass
SMART CODE
PrivateSub cmd_clear_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmd_clear.Click
If txt_pin.Text = txt_message.Text Then
MsgBox("Authentication Success", MsgBoxStyle.Information,"Security Area")
Dec_msg.Show()
ExitSub
EndIf
DECRYPT
Try
Dim pdu As SmsSubmitPdu
Dim alert AsBoolean = chkAlert.Checked
Dim unicode AsBoolean = chkUnicode.Checked
IfNot alert AndAlsoNot unicode Then
-
7/30/2019 Christ the King Polytechnic College
14/39
' The straightforward version
' "" indicate SMSC No
pdu = New SmsSubmitPdu(txt_message.Text,
txt_destination_numbers.Text, "")
Else
' The extended version with dcs
Dim dcs AsByte
IfNot alert AndAlso unicode Then
dcs = DataCodingScheme.NoClass_16Bit
ElseIf alert AndAlsoNot unicode Then
dcs = DataCodingScheme.Class0_7Bit
ElseIf alert AndAlso unicode Then
dcs = DataCodingScheme.Class0_16Bit
Else
dcs = DataCodingScheme.NoClass_7Bit
EndIf
' should never occur here
pdu = New SmsSubmitPdu(txt_message.Text,txt_destination_numbers.Text, "", dcs)
pdu = New SmsSubmitPdu(txt_message.Text,
txt_destination_numbers.Text, "", dcs)
EndIf
' Send the same message multiple times if this is set
Dim times AsInteger = If(chkMultipleTimes.Checked,
Integer.Parse(txtSendTimes.Text), 1)
' Send the message the specified number of times
i = 0
-
7/30/2019 Christ the King Polytechnic College
15/39
For i = 0 To times - 1
commsetting.comm.SendMessage(pdu)
' Output("Delivered : " & rs.Fields(0).Value &
"Message {0} of {1} sent.", i + 1, times)
' Output("")
Next
Catch ex As Exception
EndTry
Cursor.Current = Cursors.[Default]
Dim j AsInteger
j = 0
i = 0
For i = 0 To 11
grid1.Columns.Add(i + 1, i + 1) : grid1.Columns(i).Width = 50
Next i
i = 0
grid1.RowCount = 12
For i = 0 To Frm_WPC.grid1.ColumnCount - 1
For j = 0 To grid1.RowCount - 1
grid1.Item(i, j).Value = Frm_WPC.grid1.Item(i, j).Value
Next j
Next i
EndSub
-
7/30/2019 Christ the King Polytechnic College
16/39
4.2 FEATURES
Here is list of VB.NET features:-
Object Oriented Programming language.
Support of inheritance, overloading, interfaces, shared members and constructors.
Supports all CLS features such as accessing and working with .NET classes,
interaction with other .NET languages, Meta data support, common data types, and
delegates.
Multithreading support.
Structured exception handling.
-
7/30/2019 Christ the King Polytechnic College
17/39
CHAPTER 5
5.PROJECT DESCRIPTION
5.1 PROBLEM DEFINITION
Data security is one of the major areas in data transferring domain. Unfortunately
we dont have much powerful tool in achieving this. Eventhough there is possibility of having
high security in authentication and authorization area it leads to some miscelleaneous problems
in third party testimonials. To overcome these kind of problems lot of computational trust
models introduced but still they facing some logical problems.
To produce an complete solution to the above factor, the proposed system
introduced an new model technology with ADHOC support.
5.2 OVERVIEW OF THE SYSTEM
The first step in project is selecting the panel for saving our encrypting message.
After choosing the panel it provides an 12*12 matrix that is 144 cells. In which encryptedmessage to be sent to the recipient is entered after that the recipient contact number is given .
An smart code is generated by the algorithm and sent to the number. From the
kernel registry algorithm the messages are stored in panel. When the smart code is entered by the
system validation is done. After cross checking the decrypted message is sent to the recipient
mobile.
5.3 MODULE DESCRIPTION
The modules of project Security process by using WPC cryptography in ADHOC
WPC area
SMART CODE GENERATOR
SMART CODE VALIDATION
-
7/30/2019 Christ the King Polytechnic College
18/39
Encrypting
Decrypting
5.3.1 WPC AREA
The panel is chosen by the sender for sending the message
-
7/30/2019 Christ the King Polytechnic College
19/39
5.3.2 ENCRYPTION
The message to be sent is encrypted in the 144 cells and recipient number is entered
-
7/30/2019 Christ the King Polytechnic College
20/39
5.3.3 SMART CODE GENERATOR
The smart code is generated from the algorithm and sent to the recipient number.
-
7/30/2019 Christ the King Polytechnic College
21/39
5.3.4 SMART CODE VALIDATION
The smart code is validated when entered and in case of wrong code error message is printed.
-
7/30/2019 Christ the King Polytechnic College
22/39
5.4.5 DECRYPTION
-
7/30/2019 Christ the King Polytechnic College
23/39
5.4 DATAFLOW DIAGRAM
A system Flow Diagram is defined as a pictorial representation describing process of the
project. It provides a logical diagram of the system operates. It also reflects the relationship
between inputs, processing and outputs. The System Flow Diagram consists of symbols such as
process box, decision box, input/output box and start/end symbols joined by lines. A process box
represents a single step of and entire sub-process within a larger process. A decision box is used
to present different decision emerge from different points of the diamond
5.5 USE CASE DIAGRAM
A use case diagram in the Unified Modeling Language (UML) is a type of behavior
diagram defined and created from a Use-case analysis. Its purpose is to present a graphical
overview of the functionality provided by a system in terms of actors, their goals (represented as
use cases), and any dependencies between those use cases. The main purpose of a use case
diagram is to show what system functions are performed for which actors. Roles of the actors in
the system can be depicted.
-
7/30/2019 Christ the King Polytechnic College
24/39
-
7/30/2019 Christ the King Polytechnic College
25/39
5.6 DATABASE DESIGN
5.6.1 ADMIN LOGIN
5.6.2 TABLE 2
TABLE DESIGN : ENCRYPT_MESSAGE
S.No Field Name Data Type Description
1 Frm_name Varchar(50) Form name
2 Pwd Varchar(30) Password
3 Msg Varchar(200) Message
5.6.3 TABLE 3
TABLE DESIGN : MESSAGE_MAIN
S.No Field Name Data Type Description
1 Mob Varchar(50) Mobile Number 2 Msg Varchar(250) Message
3 Port Numeric(9) Port Address
5.6.4 TABLE 4
S.No Field Name Data Type Description
1 Id Numeric(9) Port Id
S.No Field Name Data Type Description
1 Ad Varchar(50) Admin
-
7/30/2019 Christ the King Polytechnic College
26/39
5.7 INPUT DESIGN
Input design is one of the main concepts of the form developing. It should be developed using
the static forms pages (.net forms).They are deeply described in the design phase.
Input design is the process of converting user originated inputs to the computer Based format.
All the data entry screens are of interactive nature so that the user can directly enter input data
according to the request messages.
The input forms included in this are:
Login form
Mdi form
Message form
Message encryption
Message decryption
5.8 OUTPUT DESIGN
In this system the output is generated in the input form itself. With the help of the
generated output the user makes various decisions. The right decision can be made in the right
time using the proposed system.
The output in this is successfully decrypting and encrypting the file and message sending from
the pc to mobile.
-
7/30/2019 Christ the King Polytechnic College
27/39
CHAPTER 6
6.SYSTEM TESTING
The most important phase in system development life cycle is system testing. The
number and nature of errors in a newly designed system depends on the system specifications
and the time frame given for the design .A newly designed system should have all the
subsystems working together, but in reality each subsystems work independently. During this
phase, all the subsystems are gathered into one pool and tested to determine whether it meets
the user requirements.
The following testings are performed in this project
Compatibility testing
Usability Testing
USABILITY TESTING:
Test for navigation:
Navigation means how the user surfs the input screen, different controls like
buttons, boxes or how user using the links on the pages to surf different input pages.Usability testing includes:
i.The boxes to go to next page should be provided properly.
ii.The navigation boxes like OK,ENCRYPT,DECRYPT etc has to be given in an
user friendly manner
iii.The page comparison system should be easy to use. Instructions should be provided
clearly in using the comparison system. Check whether the provided instructions are
correct and they satisfy the exact purpose that meets user requirements.
Content checking:
In this testing the contents of the output are checked and verified whether its
correct or not.the following actions are performed in the Security Process by using
WPC in Cryptography in AD-HOC Networks
-
7/30/2019 Christ the King Polytechnic College
28/39
i.The output pages must appear in correct order.
ii.The data present in the output page like encryption details,decryption details and smart
code must appear in proper way.
iii.There should not be any error in the output screens that appears
COMPATIBILITY TESTING:
Compatibility of software is very important testing aspect. The compatibility for the
security process by using WPC in cryptography in AD-HOC networks is in terms of the
language supporting the system , the hardware and the interface window. Thus this testing
tests for
Language compatibility
OS compatibility
Language compatibility
In language compatibility it is tested whether the programming language used is
capable of handling VB.NET codes and is successful in splitting them as image and codes
separately. Also it should handle the codes in comparing and find the clone percentage
accurately.
OS compatibility
Some functionality of this software may not be compatible with all
operating systems. All new technologies used in image connection and storage of data like
graphics designs, message transfer may not be available in all Operating Systems. Test the
software on different operating systems like Windows, Unix, MAC, Linux, Solaris with
different OS flavors.
-
7/30/2019 Christ the King Polytechnic College
29/39
CHAPTER 7
7.SYSTEM IMPLEMENTATION
System Implementation is the stage of the project when the theoretical design is
tuned into working system. If the implementation system stage is not carefully controlled and
planned, it can cause chaos. Thus it can be considered to be the most critical stage in achieving a
successful new system and in giving the users a confidence that the system will work and be
effective.
The implementation stage in a project involves,
Careful Planning investigation of the current system, checking constraints and the
implementation.
Training the staffs in the newly developed system.
A software application in general is implemented after navigating the complete life cycle method
of a project. Various life cycle processes such as requirement analysis, design phase, verification,
testing and finally followed by the implementation phase results in a successful project
management. The software application which is basically a Windows based application has been
successfully implemented after passing various life cycle processes mentioned above.
As the software is to be implemented in a high standard industrial sector, various factors such as
application environment, user management, security, reliability and finally performance are
taken as key factors through out the design phase.
-
7/30/2019 Christ the King Polytechnic College
30/39
CHAPTER 8
8. CONCLUSION AND FUTURE ENHANCEMENTS
8.1 CONCLUSION
The goal of the project SECURITY PROCESS BY USING WPC
CRYPTOGRAPHY IN AD-HOC NETWORKS has been successfully achieved. The testing
and implementation has been done in a step-by-step process. Each module has been developed
and tested individually to obtain the necessary required output in the desired form. The project
has been done as user-friendly software for easy handling of transactions.
The software developed has been designed and run to satisfy the requirements and
needs of the organization as well as the end users. The system reduces the corruption of files like
while the file transfer is done. It has also resulted in quick retrieval and reference of required
information, which is vital to the degrees of the organization.
The entire system is documented and can be easily understood by the end users.The
form are very user friendly and also easy to handle even by the beginners with very little effort and
guidance.
8.2FUTUREENHANCEMENTS
1.AUDIO FILE TRANSFERANCE
2.VIDEO FILE TRANSFERANCE
3.SMS TEXT
-
7/30/2019 Christ the King Polytechnic College
31/39
CHAPTER 9
9.APPENDIX
SAMPLE CODINGS
Module RC4
Public Function cRC4(ByVal inp As String, ByVal key As String) As String
On Error Resume Next
Dim s(255) As Byte, K(255) As Byte, i As Long
Dim j As Long, temp As Byte, y As Byte, t As Long, x As Long
Dim Outp As String
For i = 0 To 255
s(i) = i
Next
j = 1
For i = 0 To 255
If j > Len(key) Then j = 1
K(i) = Asc(Mid(key, j, 1))
j = j + 1
Next i
j = 0
For i = 0 To 255
-
7/30/2019 Christ the King Polytechnic College
32/39
j = (j + s(i) + K(i)) Mod 256
temp = s(i)
s(i) = s(j)
s(j) = temp
Next i
i = 0
j = 0
For x = 1 To Len(inp)
i = (i + 1) Mod 256
j = (j + s(i)) Mod 256
temp = s(i)
s(i) = s(j)
s(j) = temp
t = (s(i) + (s(j) Mod 256)) Mod 256
y = s(t)
Outp = Outp & Chr(Asc(Mid(inp, x, 1)) Xor y)
Next
cRC4 = Outp
End Function
End Module
-
7/30/2019 Christ the King Polytechnic College
33/39
CONNECTION FORM
Imports System.Drawing
Imports System.Collections
Imports System.ComponentModel
Imports System.Windows.Forms
Imports GsmComm.GsmCommunication
Imports System.Data.SqlClient
Public Class Frmconnection
Private port As Integer
Private baudRate As IntegerPrivate timeout As Integer
Private Sub Frmconnection_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
cboPort.Text = "13"
cboBaudRate.Text = "115200"
cboTimeout.Text = timeout.ToString()
If Not EnterNewSettings() Then
DialogResult = DialogResult.None
End If
End Sub
Private Sub btnTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnTest.Click
If Not EnterNewSettings() Then
Return
End If
Cursor.Current = Cursors.WaitCursor
-
7/30/2019 Christ the King Polytechnic College
34/39
Dim comm As New GsmCommMain(port, baudRate, timeout)
Try
comm.Open()
While Not comm.IsConnected()
Cursor.Current = Cursors.[Default]
If MessageBox.Show(Me, "No phone connected.", "Connection setup",
MessageBoxButtons.RetryCancel, MessageBoxIcon.Exclamation) = DialogResult.Cancel Then
comm.Close()
Return
End If
Cursor.Current = Cursors.WaitCursor
End While
comm.Close()
Catch ex As Exception
MessageBox.Show(Me, "Connection error: " + ex.Message, "Connection setup",
MessageBoxButtons.OK, MessageBoxIcon.Warning)
Return
End Try
MessageBox.Show(Me, "Successfully connected to the phone.", "Connection setup",
MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
Private Function EnterNewSettings() As Boolean
Dim newPort As Integer
Dim newBaudRate As Integer
Dim newTimeout As Integer
Try
newPort = Integer.Parse(cboPort.Text)
-
7/30/2019 Christ the King Polytechnic College
35/39
Catch generatedExceptionName As Exception
MessageBox.Show(Me, "Invalid port number.", "Error", MessageBoxButtons.OK,
MessageBoxIcon.Exclamation)
cboPort.Focus()
Return False
End Try
Try
newBaudRate = Integer.Parse(cboBaudRate.Text)
Catch generatedExceptionName As Exception
MessageBox.Show(Me, "Invalid baud rate.", "Error", MessageBoxButtons.OK,
MessageBoxIcon.Exclamation)
cboBaudRate.Focus()
Return False
End Try
Try
newTimeout = Integer.Parse(cboTimeout.Text)
Catch generatedExceptionName As Exception
MessageBox.Show(Me, "Invalid timeout value.", "Error", MessageBoxButtons.OK,
MessageBoxIcon.Exclamation)
cboTimeout.Focus()
Return False
End Try
SetData(newPort, newBaudRate, newTimeout)
Return True
End Function
Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnOK.Click
-
7/30/2019 Christ the King Polytechnic College
36/39
If Not EnterNewSettings() Then
DialogResult = DialogResult.None
End If
If j = False Then
Me.Close()
ElseIf j = True Then
Me.Hide()
Frm_smart_recipent.ShowDialog()
End If
End Sub
Public Sub SetData(ByVal port As Integer, ByVal baudRate As Integer, ByVal timeout As
Integer)
Me.port = port
Me.baudRate = baudRate
Me.timeout = timeout
End Sub
Public Sub GetData(ByRef port As Integer, ByRef baudRate As Integer, ByRef timeout As
Integer)
port = Me.port
baudRate = Me.baudRate
timeout = Me.timeout
End Sub
End Class
-
7/30/2019 Christ the King Polytechnic College
37/39
TESTING ERROR CODE TESTING
-
7/30/2019 Christ the King Polytechnic College
38/39
CHAPTER 10
10. REFERENCES
[1] J. Fridrich, M. Goljan, P. Lisonek, and D. Soukal, Writing on wet paper, Special Issue on
Media Security, IEEE Trans. Signal Process.,vol. 53, pp. 39233935, Oct. 2005.
[2] J. Fridrich, M. Goljan, and D. Soukal, Efficient wet paper codes, inProc. 7th Int.Workshop
on Information Hiding, 2005, vol. 3727,LNCS, pp. 204218
[3] H. Gou and M. Wu, Improving embedding payload in binary images with super-pixels,
inProc. IEEE Int. Conf. Image Processing (ICIP2007), 2007, pp. 277280.
[4] J. Yu, X. Wang, J. Li, and X. Nan, A fragile document watermarking technique based on
wet paper code, in Proc. Int. Conf. Intelligent InformationHiding and Multimedia Signal
Processing (IIHMSP 2008), 2008, pp. 2528
[5]Y. C. Tseng, Y.-Y. Chen, and H.-K. Pan, A secure data hiding scheme for binary images,
IEEE Trans. Commun., vol. 50, no. 8, pp.12271231, Aug. 2002
BOOKS REFERRED:
1. Alex Homer , Professional VB.NET 1.1, 2004 Edition, Wrox Publications
2. Steven Holzner, Visual Basic.NET Black Book, 2003 Edition, Dreamtech
Publications
3. Roger S Pressman, Software Engineering, 2000 Edition, Dreamtech Publications
4. Karli Watson, Richard Anderson , Professional ASP.NET 1.1 , 2004 Edition, Wrox
Publications
5. Pooja Bembey and Kuljit Kaur with NIIT,Microsoft Visual Basic.Net Professional
Projects,2002 Edition, Prentice Hall of India Private Limited.
6. Alex Homer , Professional VB.NET 1.1, 2004 Edition, Wrox Publications
-
7/30/2019 Christ the King Polytechnic College
39/39
7. Steven Holzner, Visual Basic.NET Black Book, 2003 Edition, Dreamtech
Publications
8. Roger S Pressman, Software Engineering, 2000 Edition, Dreamtech Publications
9. Karli Watson, Richard Anderson , Professional ASP.NET 1.1 , 2004 Edition, Wrox
Publications
10. Pooja Bembey and Kuljit Kaur with NIIT,Microsoft Visual Basic.Net Professional
Projects,2002 Edition, Prentice Hall of India Private Limited.
Websites:
1. www.msdn.microsoft.com
2. www.vbcity.com
3. www.vbdotnetheaven.com
4. www.codeguru.com
5. www.w3schools.com.
6. www.sharewareconnection.com
7. www.elegancetech.com
8. www.devarticles.com
9. www.programmingtutorials.com
10. www.programmersheaven.com
http://www.msdn.microsoft.com/http://www.vbcity.com/http://www.vbdotnetheaven.com/http://www.codeguru.com/http://www.w3schools.com/http://www.w3schools.com/http://www.sharewareconnection.com/http://www.elegancetech.com/http://www.devarticles.com/http://www.programmingtutorials.com/http://www.programmersheaven.com/http://www.msdn.microsoft.com/http://www.vbcity.com/http://www.vbdotnetheaven.com/http://www.codeguru.com/http://www.w3schools.com/http://www.sharewareconnection.com/http://www.elegancetech.com/http://www.devarticles.com/http://www.programmingtutorials.com/http://www.programmersheaven.com/