Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

WAVE Steganography

 
Greenhorn
Posts: 4
Notepad
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, I am trying to hide string data to a wave file. I am removing (apparently) headers from the wav file using AudioSystem.getAudioInputStream(file).

Then I am (trying to) change the last bits to the string user has entered and then writing the byte array to a new WAV file using AudioSystem.write(AudioInputStream, AudioFileFormat.Type.WAVE, file).

I've checked the first 44 bytes(headers) of both the input and the output files and the input file doesn't seem to have "RIFF" and size of file whether the output file has apparently everything a WAVE header should have.

Still after writing the data using the below mentioned code when I tried to read the hidden data using another code I am getting the same data even if i change the user input (hidden string), that points out that data isn't being written at all.

Thanks in advance whoever has read this much and looking forward to help.

 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
903271
Where are you getting that number from?

The is.read will not necessarily fill the byte[], so it's quite possible you have an incomplete read.
In addition, how do you know that the size of the WAV file is exactly 903271 bytes?
If it isn't then you are either chopping off the end of the WAV, or ending up with a load of 0's at the end of the array, as you then write the entire array out.
reply
    Bookmark Topic Watch Topic
  • New Topic