Joined: Tue Mar 27, 2007 10:55 pm Posts: 2103 Location: Earth Has thanked: 39 time Have thanks: 56 time
* Project Name:
Steganongrapy using Audio * Programmer:Langesh * Type:Java Swing * Technology:Java * IDE:Any * Description:In this project, the message is encoded with audio file for the secure transfer.
if(ae.getSource()==Bencrypt) { if(Copened==1) { Ekey=JOptionPane.showInputDialog("Enter The Key For Encryption"); //String type if(Ekey.trim().equals("")) JOptionPane.showMessageDialog(this,"Enter the Key","Error",JOptionPane.ERROR_MESSAGE); else { // encrypt the message int key=Integer.parseInt(Ekey); Audioencrypt(Amessage.getText(),Ofilename,key); Cencrypt=1; } } else { JOptionPane.showMessageDialog(this,"File Not Opened","Error",JOptionPane.ERROR_MESSAGE); } } // end of Bencrypt
// Action for Clear button
else if(ae.getSource()==Bclear) { Amessage.setText(""); } // end of clear button
// Action for Decrypt button
else if(ae.getSource()==Bdecrypt) { if(Copened==1) { Dkey=JOptionPane.showInputDialog("Enter The Key For Decryption"); //String type if(Dkey.trim().equals("")) JOptionPane.showMessageDialog(this,"Enter the Key","Error",JOptionPane.ERROR_MESSAGE); else { // decrypt message int key=Integer.parseInt(Dkey); Audiodecrypt(Ofilename,key); Cdecrypt=1; } } else JOptionPane.showMessageDialog(this,"File Not Opened","Error",JOptionPane.ERROR_MESSAGE); } // end of Decrypt button
else JOptionPane.showMessageDialog(this,"File Not Opened","Error",JOptionPane.ERROR_MESSAGE);
} // end of play button
// Action for Stop button
else if(ae.getSource()==Bstop) {
if(Cplay==1) {
Cplay=0; Cstop=1; AudioPlayer.player.stop(as);
} // stop plaing
else
JOptionPane.showMessageDialog(this,"No Audio Is playing","Error",JOptionPane.ERROR_MESSAGE);
} // end of stop button
// Action for open Button
else if(ae.getSource()==Bopen) { int r=filechooser.showOpenDialog(this); tempfilename=filechooser.getSelectedFile(); //File type if(r==JFileChooser.CANCEL_OPTION) JOptionPane.showMessageDialog(this,"File Not Selected","Error",JOptionPane.ERROR_MESSAGE); else { name=tempfilename.getName();
if(!(name.endsWith(".wav")))
JOptionPane.showMessageDialog(this,"Select Only Wav","Error",JOptionPane.ERROR_MESSAGE);