• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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.
 
a fool thinks himself to be wise, but a wise man knows himself to be a fool - shakespeare. foolish tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic